-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
"Replace Selection" Erroneously Removing/Interpreting Escape Sequences #5494
Comments
Thanks for reporting. We'll fix it in one of our next releases. @rlaverde, please take a look at this one. |
Thanks very much. On a related note, I've been consistently bothered with the find and replace dialog that there appears to be no evident way to move between the textbox where one enters the string to search for, and the one to replace it with, i.e. TAB doesn't work as it should (and does everywhere else); again on multiple Windows machines with the above traits. My only recourse is to manually click around with the mouse, and googling and the keyboard shortcuts dialog hasn't revealed any obvious solutions. Is this in fact a bug (the field trapping TAB?), or am I missing something? If the former, I guess I'll open a new issue? Thanks. |
Hello, I have this issue again in Spyder 3.3.6, always reproducible, If you use line continuation character, Best regards |
Description of your problem
When performing a find and replace using the basic Ctrl-R in Spyder, the "Replace Selection" option will remove and parse escape sequences present in the selected portion of the file regardless of the actual find query, silently deleting line continuation ""s and rendering "\n"s, "\r"s etc. as newlines, etc, and likely similar for others. This almost invariably breaks the code and requires careful diagnosis and manual inspection to fix, and there appears to be no obvious workaround other than using "Replace all" or going through result by result, which does not trigger the issue.
I've tested this across multiple machines across various versions of Python and Spyder since installing Anaconda between 1-2 months ago.
What steps will reproduce the problem?
Minimal example code:
test_string = "foo"
long_string = "foo" + "\n" + "bar"
cap_string = long_string\
.capitalize()
print(cap_string)
What is the expected output? What do you see instead?
Expected:
test_str= "foo"
long_str= "foo" + "\n" + "bar"
cap_str= long_str\
.capitalize()
print(cap_str)
Actual:
test_str= "foo"
long_str= "foo" + "
" + "bar"
cap_str= long_str
.capitalize()
print(cap_str)
Versions and main components
Dependencies
IPython >=4.0 : 5.3.0 (OK)
cython >=0.21 : 0.25.2 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.1.1 (OK)
numpy >=1.7 : 1.12.1 (OK)
pandas >=0.13.1 : 0.20.1 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pyflakes >=0.6.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.7.2 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.5.6 (OK)
sympy >=0.7.3 : 1.0 (OK)
The text was updated successfully, but these errors were encountered: