Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search/Replace ignores items if already highlighted #15963

Open
eafpres opened this issue Jul 1, 2021 · 1 comment
Open

Search/Replace ignores items if already highlighted #15963

eafpres opened this issue Jul 1, 2021 · 1 comment

Comments

@eafpres
Copy link

eafpres commented Jul 1, 2021

Issue Report Checklist

Problem Description

If a block of code is already highighted, entering Replace text mode will not "see" instances to replace even though they are there. However, selecting "In selection" does in fact make the requested repalcements.

What steps reproduce the problem?

  1. Here, nothing was highlighted in the code, Find text was selected, and the text "scaled_boundary" was typed. The correct items are then highlighted.
    image
    The same result is obtained if the block from line 10 to 23 is highlighted before selecting Find text--the text typed in is highlighted and the item i of n is displayed correctly

  2. Here, the block from line 10 to 23 was highlighted in the editor, then Replace text is selected, and the text "scaled_boundary" is typed in. Nothing is highlighted, it says no matches.
    image
    However, if you enter a replacement text and choose In selection, the replacements ARE made.

  3. Here, the block from line 10 to 23 was not highlighted before selecting Replace text, then when the text is typed in, the correct texts are highlighted and the item i of n is displayed correctly.
    image

What is the expected output? What do you see instead?

When you select Replace text with a code block highlighted, and you enter a text to find, it should still find them and display item i of n, so that you know what is going to happen next.

Paste Traceback/Error Below (if applicable)

None

Versions

  • Spyder version: 5.0.4 None
  • Python version: 3.8.10 64-bit
  • Qt version: 5.12.10
  • PyQt5 version: 5.12.3
  • Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  7.24.1 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.0.1 (OK)
nbconvert >=4.0               :  6.0.7 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.7.2 (OK)
parso =0.7.0                  :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.9.0 (OK)
pylint >=1.0                  :  2.8.3 (OK)
pyls >=0.36.2;<1.0.0          :  0.36.2 (OK)
pyls_black >=0.4.6            :  0.4.7 (OK)
pyls_spyder >=0.3.2;<0.4.0    :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.0 (OK)
qtawesome >=1.0.2             :  1.0.2 (OK)
qtconsole >=5.1.0             :  5.1.0 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=39.0.0           :  56.0.0 (OK)
sphinx >=0.6.6                :  4.0.2 (OK)
spyder_kernels >=2.0.4;<2.1.0 :  2.0.4 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.2 (OK)
zmq >=17                      :  22.1.0 (OK)

# Optional:
cython >=0.21                 :  0.29.23 (OK)
matplotlib >=2.0.0            :  3.4.2 (OK)
numpy >=1.7                   :  1.19.5 (OK)
pandas >=1.1.1                :  1.2.4 (OK)
scipy >=0.17.0                :  1.6.3 (OK)
sympy >=0.7.3                 :  None (NOK)
@dalthviz
Copy link
Member

Hi @eafpres, sorry for the late response. thanks for the feedback, I was able to reproduce this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants