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

Wrong screen position after tab switch (with word wrap) #2078

Closed
brain-HUN opened this issue Jul 12, 2016 · 7 comments
Closed

Wrong screen position after tab switch (with word wrap) #2078

brain-HUN opened this issue Jul 12, 2016 · 7 comments
Labels
verified Issues verified to be valid and reproducible, PRs that have been tested thoroughly

Comments

@brain-HUN
Copy link

I would like to report an annoying issue when using the word wrap feature. If you switch between documents while editing and you got the word wrap feature enabled, then the screen position is off.

Here is how to reproduce it:
Open a document with very long lines in it. Like this: <unwrapped.png>
Turn on word wrap and move to the end of the document. Like this <wrapped.png>
Then switch to another open document and switch back. And it will look like something like this: <wrapped_after_tabswitch.png>

Expected: The screen should go back to exactly where it was.
Result: The screen is off. The cursor is not visible on the screen. This doesn't happen when word wrap is off.
unwrapped
wrapped
wrapped_after_tabswitch

@qdinar
Copy link

qdinar commented Apr 9, 2017

additional material:
np-pp-sroll-position-bug.txt
try to put cursor to "123" and change tab and return back to this tab. it does not open proper position with 1366 768 display, in win10, n++ 7.2.2 64bit .

@MaximilianKohler
Copy link

Ugh, a year later and still not fixed ._.

This is a pretty major issue... Definitely going to be looking for alternatives. Is there an older version or something we can use for now?

@ChrisAkridge
Copy link

Also running into this issue with N++ 7.5.4 32-bit.

@MetaChuh MetaChuh added the verified Issues verified to be valid and reproducible, PRs that have been tested thoroughly label Apr 8, 2019
@Arczi008TV
Copy link

N++ 7.5.9 (64bit) = no issue
N++ 6.0.0 (64bit) = jumping..

@sasumner
Copy link
Contributor

@Arczi008TV

N++ 6.0.0 (64bit) = jumping..

So you are saying that for you this complaint is against version 6.0?

@brain-HUN
Copy link
Author

I have just checked it v7.8.1 (64 bit) and the issue is still present.

@Arczi008TV
Copy link

Arczi008TV commented Nov 29, 2019

I mean its happened again from v6.0 and up, they reverted fix because of some performance issue. That is stupid..

If you need version without that bug, just use 7.5.9 :)

@donho donho closed this as completed in 9387dcd Jan 6, 2020
cezariuszmarek pushed a commit to cezariuszmarek/notepad-plus-plus that referenced this issue Jan 11, 2020
If you switch between tabs while wrap mode is enable, text jump to another lines.
It's an old bug, fixed in v7.5.9, but it had performance regression so it was reverted in v6.0.0.

It's been one year, and I'm back.
This works whatever the size of the file.
There isn't any performance regression because we don't use SCI_ENSUREVISIBLE scintilla command.

In case wrap option on, The restore position function is done in **twice** steps.

- First step: set selection, set anchor, set xoffset...
- Second step: once Scintilla has send the notification SCN_PAINTED, we can scroll several lines to set the first visible line to the correct wrapped line.

Keep in mind that Line wrapping is a background activity that takes time, specially for huge file.

Fix notepad-plus-plus#2078, fix notepad-plus-plus#2576, fix notepad-plus-plus#3570, fix notepad-plus-plus#4825, fix notepad-plus-plus#4881, close notepad-plus-plus#7781
alef162 pushed a commit to alef162/notepad-plus-plus that referenced this issue Oct 11, 2020
If you switch between tabs while wrap mode is enable, text jump to another lines.
It's an old bug, fixed in v7.5.9, but it had performance regression so it was reverted in v6.0.0.

It's been one year, and I'm back.
This works whatever the size of the file.
There isn't any performance regression because we don't use SCI_ENSUREVISIBLE scintilla command.

In case wrap option on, The restore position function is done in **twice** steps.

- First step: set selection, set anchor, set xoffset...
- Second step: once Scintilla has send the notification SCN_PAINTED, we can scroll several lines to set the first visible line to the correct wrapped line.

Keep in mind that Line wrapping is a background activity that takes time, specially for huge file.

Fix notepad-plus-plus#2078, fix notepad-plus-plus#2576, fix notepad-plus-plus#3570, fix notepad-plus-plus#4825, fix notepad-plus-plus#4881, close notepad-plus-plus#7781
chcg added a commit to chcg/notepad-plus-plus that referenced this issue Nov 5, 2023
Scintilla Release 5.3.8 https://www.scintilla.org/scintilla538.zip

    Released 5 November 2023.
    Fix excessive memory use when deleting contiguous ranges backwards. Notepad++ Issue notepad-plus-plus#13442.
    Fix incorrect substitution when searching for a regular expression backwards. Bug notepad-plus-plus#2405.
    Make SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN work for rectangular selections. Bug notepad-plus-plus#2078.
    For Cocoa, minimum supported macOS release increased to 10.13.
    For Cocoa, fix invisible text on macOS 14 Sonoma. Bug notepad-plus-plus#2402.
    For Cocoa, do nothing for suspendDrawing on macOS 10.14+ as the underlying calls have been deprecated.

and lexilla

Release 5.2.8 https://www.scintilla.org/lexilla528.zip

    Released 5 November 2023.
    Python: Update f-string handling to match PEP 701 and Python 3.12. Controlled with property lexer.python.strings.f.pep.701. Issue notepad-plus-plus#150, Pull request notepad-plus-plus#209.
    R: Fix escape sequence highlighting with change of for loop to while loop. Issue notepad-plus-plus#206, Pull request notepad-plus-plus#207.
    Minimum supported macOS release increased to 10.13.
donho pushed a commit to donho/notepad-plus-plus that referenced this issue Nov 7, 2023
Scintilla Release 5.3.8 https://www.scintilla.org/scintilla538.zip

    Released 5 November 2023.
    Fix excessive memory use when deleting contiguous ranges backwards. Notepad++ Issue notepad-plus-plus#13442.
    Fix incorrect substitution when searching for a regular expression backwards. Bug notepad-plus-plus#2405.
    Make SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN work for rectangular selections. Bug notepad-plus-plus#2078.
    For Cocoa, minimum supported macOS release increased to 10.13.
    For Cocoa, fix invisible text on macOS 14 Sonoma. Bug notepad-plus-plus#2402.
    For Cocoa, do nothing for suspendDrawing on macOS 10.14+ as the underlying calls have been deprecated.

and lexilla

Release 5.2.8 https://www.scintilla.org/lexilla528.zip

    Released 5 November 2023.
    Python: Update f-string handling to match PEP 701 and Python 3.12. Controlled with property lexer.python.strings.f.pep.701. Issue notepad-plus-plus#150, Pull request notepad-plus-plus#209.
    R: Fix escape sequence highlighting with change of for loop to while loop. Issue notepad-plus-plus#206, Pull request notepad-plus-plus#207.
    Minimum supported macOS release increased to 10.13.

Related to Notepad++ issue notepad-plus-plus#13442, notepad-plus-plus#14188 & notepad-plus-plus#14288
Tested with: notepad-plus-plus#14188 (comment)
Result: notepad-plus-plus#14188 (comment)

Fix notepad-plus-plus#13442, fix notepad-plus-plus#14188, fix notepad-plus-plus#14288, close notepad-plus-plus#14320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified Issues verified to be valid and reproducible, PRs that have been tested thoroughly
Projects
None yet
7 participants