Notepad-plus-plus: Switching tabs with Word Wrap enabled does not scroll to previous position

Created on 19 Jun 2015  路  3Comments  路  Source: notepad-plus-plus/notepad-plus-plus

This issue was discussed a few years ago on the SourceForge discussion forum (Google Cache link because trying to access the thread normally results in a 403 error).

To summarize the thread, the bug occurs when Word Wrap is enabled and a file that has text lines long enough to be wrapped is switched to. The window will display text many lines above the section of the document that was visible before tab focus was moved away from the document.

The expected behavior would be to have the window display the section visible before focus was switched away from the tab initially. NPP does behave as expected when Word Wrap is turned off. After testing, it seems that the position the window displays corresponds to the section that would be visible if Word Wrap were disabled, so I suspect that the related function does not take the additional vertical offset caused by Word Wrap into account. The behavior described here can be observed by repeatedly toggling Word Wrap on and off.

(I am posting this issue because I could not find it on here already, nor could I find anything other than the four-year-old thread that initially discussed it. This bug is still present as of 6.7.9. Apologies if this is a duplicate submission or should have been posted elsewhere.)

bug

Most helpful comment

This also happens when I reload a file from disk. It's reproducible, and the offset matches the number of extra lines added by word wrap.

I'm using version 6.8.7 on Windows 7. I have XML Tools, but switching "Set XML type automatically" off has no effect on this bug.

As a workaround, I have set up a macro and keyboard shortcut for reload and scroll to end.

All 3 comments

This also happens when I reload a file from disk. It's reproducible, and the offset matches the number of extra lines added by word wrap.

I'm using version 6.8.7 on Windows 7. I have XML Tools, but switching "Set XML type automatically" off has no effect on this bug.

As a workaround, I have set up a macro and keyboard shortcut for reload and scroll to end.

Bug still present on N++ 7.5.4 32-bit.

Update your Notepad++ to v7.6.6.
If this bug persists in the new release, please open a new issue with the debug information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bairgon picture bairgon  路  3Comments

pengowray picture pengowray  路  3Comments

bveldkamp picture bveldkamp  路  3Comments

GunAlm picture GunAlm  路  3Comments

pdanielewski1 picture pdanielewski1  路  3Comments