notepad-plus-plus icon indicating copy to clipboard operation
notepad-plus-plus copied to clipboard

Bookmark and hidden-lines margin symbols can overlap to bad visual effect

Open alankilborn opened this issue 3 years ago • 19 comments

Description of the Issue

Bookmark and hidden lines margin marker symbols, when occurring on the same line, can overlap such that the effect is not good:

image

Mentioned first here: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/12165#issuecomment-1245918299

Steps to Reproduce the Issue

Bookmark a line and then "strategically" hide some lines such that the closing hide line margin symbol and the bookmark marker symbol appear on the same line.

Expected Behavior

Well, something not so overlapping. :-)

Serious suggestion: Since it has never worked well and consistently, don't attempt to do margin marker symbols for hidden lines -- have another method for user making hidden lines visible again (the only function of the margin marker symbols). These margin markers aren't necessary to alert the user to where hidden lines are, because the green line drawn across the editing area does this. Of course, this implies that an alternative method for making hidden lines visible is created (not sure what that would be at the moment).

Actual Behavior

Overlap.

Debug Information

Notepad++ v8.4.5 (32-bit) Build time : Sep 3 2022 - 03:56:37 Path : C:\...\npp.8.4.5.portable\notepad++.exe Command Line : -titleAdd="8.4.5 32-bit" -multiInst Admin mode : OFF Local Conf mode : ON Cloud Config : OFF OS Name : Windows 10 Enterprise (64-bit) OS Version : 21H2 OS Build : 19044.1889 Current ANSI codepage : 1252 Plugins : mimeTools (2.8) NppConverter (4.4) NppExport (0.4) PythonScript (3.0.12)

@Yaron10

alankilborn avatar Sep 15 '22 14:09 alankilborn

@alankilborn,

Thank you.

have another method for user making hidden lines visible again (the only function of the margin marker symbols).

👍

Yaron10 avatar Sep 16 '22 00:09 Yaron10

An unbaked suggestion: Make the Hide Lines command toggleable. On placing the caret above the green hidden-lines indicator and invoking that command - display the hidden lines.

Yaron10 avatar Sep 16 '22 13:09 Yaron10

On placing the caret above the green hidden-lines indicator and invoking that command - display the hidden lines.

Definitely reasonable.

So, for visual example, placing the caret on hello and invoking the command would make the hidden line visible again:

image

I presume selection-based unhide would work similarly:

image

alankilborn avatar Sep 16 '22 13:09 alankilborn

Make the Hide Lines command toggleable.

Perhaps there should be two commands:

  • Hide Lines (existing)
  • Show Lines (new)

The reason for this is, what if, in the "hello on line 7" example above, you wanted to hide line 7 -- such that the end result would be lines 7 and 8 hidden -- another way to say it would be you wanted to add line 7 to the already hidden set of lines.

alankilborn avatar Sep 16 '22 13:09 alankilborn

Would correct terminology be Hide/Show or Hide/Unhide? :-)

alankilborn avatar Sep 16 '22 13:09 alankilborn

@alankilborn,

The reason for this is, what if, in the "hello on line 7" example above...

👍 That's a very good point.

I think I've never used "Hide Lines" in real life. Playing with it now I've encountered https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12184. :)

Yaron10 avatar Sep 16 '22 18:09 Yaron10

Would correct terminology be Hide/Show or Hide/Unhide? :-)

You're the expert. :) Perhaps "Show Hidden Lines"?

Yaron10 avatar Sep 16 '22 18:09 Yaron10

I think I've never used "Hide Lines" in real life.

Well, maybe because as it currently exists, it isn't very useful.
In fact, it is so not-useful, it shouldn't even be there as a feature. :-)

But I am trying to force some change in that, with my recent "issues" regarding hidden lines. Maybe like trying to push a rope? :-)

The ultimate goal, if and when it becomes a reasonable feature on a base level, would be to put in feature request(s) such that it works with Find All to hide (or unhide) lines with search hits. But no point in that yet.

Playing with it now I've encountered 12184

I have never been able to make N++ crash due to hidden-lines experimentation, but I can replicate that. :-(

alankilborn avatar Sep 16 '22 18:09 alankilborn

In fact, it is so not-useful, it shouldn't even be there as a feature.

That's quite a statement. :)

The ultimate goal, if and when it becomes a reasonable feature on a base level, would be to put in feature request(s) such that it works with Find All to hide (or unhide) lines with search hits.

That's a clever idea. 👍


Completely off-topic: I think the most important fix for the next release is https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12023.

Yaron10 avatar Sep 16 '22 19:09 Yaron10

In fact, it is so not-useful, it shouldn't even be there as a feature.

That's quite a statement. :)

Well, of course no offense intended to our fine developers! :-)

I'll backpedal a bit and say maybe it is great for light usage for certain users. :-)

Completely off-topic

There's a few others open relating to that. What can we say? You and I know the entire history on it...

alankilborn avatar Sep 16 '22 19:09 alankilborn

Perhaps there should be two commands:

Hide Lines (existing) Show Lines (new)

And if the margin markers are taken away from the user, mouse users would be disappointed...but we already have Hide Lines here on editor rclick context menu:

image

So a new "Show Lines" could be added there...

alankilborn avatar Sep 17 '22 11:09 alankilborn

Another good point.

If double-clicking on the green indicator can be processed, it should be the ideal solution.

Yaron10 avatar Sep 17 '22 11:09 Yaron10

If double-clicking on the green indicator can be processed, it should be the ideal solution.

To clarify, I think you mean the green bar that stretches across the editing area. Yes, that is a good idea, if it could be made to work. TBH, right now I don't see a way to easy logic for it.

User might need a way to (in one action) show/unhide multiple "green-bar'd" sections. User would make a selection that touches all of these. Double-click wouldn't help in that situation.

alankilborn avatar Sep 17 '22 11:09 alankilborn

To clarify, I think you mean the green bar that stretches across the editing area.

Correct.

TBH, right now I don't see a way to easy logic for it.

Right now I don't see anyone taking this issue. :)

User might need a way to (in one action) show/unhide multiple "green-bar'd" sections.

Is that currently possible?

Yaron10 avatar Sep 17 '22 12:09 Yaron10

Right now I don't see anyone taking this issue. :)

Well, that's why we have to campaign for it! :-) Seriously, though...you're right. :-(


User might need a way to (in one action) show/unhide multiple "green-bar'd" sections.

Is that currently possible?

I don't believe so, but I think it is reasonable thing for a user to want to do.


Possible new idea: Right-click on line number margin maybe needs its own rclick context menu, of which hide/show lines could be choices there...

alankilborn avatar Sep 17 '22 13:09 alankilborn

Another idea: use a third image containing a smaller version of both "Bookmark" and "Show Hidden Lines". Left-click should remove the bookmark, and Ctrl+Left-click would show the hidden lines (and update the images accordingly).

And another one: use a new margin for "Show Hidden Lines" and display it only if there are hidden lines. Per tab or even per instance.

Yaron10 avatar Sep 17 '22 17:09 Yaron10

@alankilborn,

BTW: https://github.com/pnedev/comparePlus/commit/54c37ebcd52c4ecb2c3a0f5e6a1221b21f885909.

Yaron10 avatar Sep 17 '22 17:09 Yaron10

BTW: https://github.com/pnedev/comparePlus/commit/...

Hopefully in the future this gets squashed by Notepad++ usage of the hidden line thing. :-)

alankilborn avatar Sep 17 '22 23:09 alankilborn

I'd like to see margin markers for hidden lines disappear entirely from Notepad++. They aren't really necessary and they seem to overcomplicate the code. The horizontal line seems sufficient.

alankilborn avatar Sep 17 '22 23:09 alankilborn