shriprem / FWDataViz

Fixed Width Data Visualizer plugin for Notepad++. Turns Notepad++ into Excel for fixed-width data files. Displays cursor position data. Jumps to specific fields. Folding Record Blocks. Extracts Data. Builtin dialogs to configure file-type, record-type & fields; Themes & Colors; and Folding. Handles homogenous, mixed & multi-line records.
GNU General Public License v2.0
37 stars 6 forks source link

Bug: When using foldable/collapsable regions, styles aren't applied to the last lines. #25

Closed sandbPublic closed 3 years ago

sandbPublic commented 3 years ago

Hi, thanks for creating this plugin.

I observed an issue where creating a foldable region and collapsing it, the style will no longer be applied to the last x visible lines, where x is the number of collapsed/hidden lines. You can produce this simply using one of the sample files like ghcnd-stations.txt, changing the language in the notepad++ language menu to something like C, and add {} with some blank lines to create a collapsable region, then collapse it.

expanded

collapsed

shriprem commented 3 years ago

@sandbPublic , Thank you for reporting this issue.

[As a side note, I was also able to replicate this issue just by selecting a block of lines and then using the NPP menu option: View » Hide Lines. The lack of visualization on the last few lines persisted even after scrolling down a page or more.]

The issue was happening due to the distinction between a document's actual line count and the line count displayed in the NPP viewport. This latter count can differ from the document line count due to wordwrapping or line folding or line hiding.

So, it turned out, that fixing this issue also fixed FWDataViz's response when a document is in wordwrap mode. In fact, prior to this fix, the plugin used to display a Turnoff Wordwrap button on the panel, whenever wordwrap was on. As a bonus, this fix has also eliminated that wordwrap limitation.

The fix is available with the Wordwrap, Fold Lines & Hide Lines Release.

DLL-only manual upgrade of a previously installed version of the plugin

On the release page, download the zip file version to match your Notepad++ bitness. Then, either:

  1. In Notepad++, navigate to menu: Settings » Import » Import Plugins... and import the dll file extracted from the zip file.
  2. OR, Extract the FWDataviz.dll file into the <NPP_Plugins_folder>/FWDataviz folder to overwrite the existing DLL therein.
sandbPublic commented 3 years ago

Working for me now, thank you.