Closed ProgerXP closed 2 years ago
Demo for initial testing purposes:
At this point even basic operations are not supported in the additional views. Please provide required set of features which should be implemented for these (highlighting/find-search/cursor navigation/etc/all at once?).
Please provide required set of features which should be implemented for these (highlighting/find-search/cursor navigation/etc/all at once?).
All views should have the same features, they simply duplicate the "main" view except for scroll position and selection that is unique per view. Actions that affect a buffer (e.g. typing, menu commands, etc.) affect last focused view.
A great example is Notepad++ - see how their View > Move/Clone Current Document > Clone To Other View command works.
Some notes on the implementation (that is nearly finished):
sp
/vsp
^W, =
in vim)Current Line, Inactive View (Color)
(and same style for 2nd Scheme); used when Highlight Current Line is on to paint line background in a view that has no focus
- added new Style:
Current Line, Inactive View (Color)
(and same style for 2nd Scheme); used when Highlight Current Line is on to paint line background in a view that has no focus
Works when HighlightLineIfWindowInactive
option is ON.
Enhancements:
COLOR_BTNFACE
) dependent on new schema rule: Default Text > Splitter
, that defaults to back:X
where X
= default of back
of Margin and Line Numbers
size
style to increment/decrement (size:1
, size:-2
) width/height of splitters using some hardcoded step (e.g. 2 pixels), and add size:0
to default rule styles so users see this change is possible[
/]
then change the former to work like this: Ctrl+PageUp goes to previous view, Ctrl+PageDown - to next, Shift+Ctrl+PageUp opens new vertical view, Shift+Ctrl+PageDown - new horizontalEsc Key Function
: "First Close Current &Split View, If Any" (under ---
in the end of Esc Key Function's submenu, as with View > Highlight Current Selection), enabled by default (if current view can't be closed and this is enabled then Escape does nothing)For discussion: currently the first (initial) view is special in that it can't be closed. How hard is it to make it closeable as well (as long as there are at least 2 views)?
- fix color of Long Line Marker in sectondary views (always gray)
- position caret in the new view on the line number where the caret was in the previous view (done in e20d94e)
make splitter's background color (currently
COLOR_BTNFACE
) dependent on new schema rule:Default Text > Splitter
, that defaults toback:X
whereX
= default ofback
ofMargin and Line Numbers
- also handle
size
style to increment/decrement (size:1
,size:-2
) width/height of splitters using some hardcoded step (e.g. 2 pixels), and addsize:0
to default rule styles so users see this change is possible- if hotkeys Ctrl+PageUp/PageDown are currently the same as Ctrl+
[
/]
then change the former to work like this: Ctrl+PageUp goes to previous view, Ctrl+PageDown - to next, Shift+Ctrl+PageUp opens new vertical view, Shift+Ctrl+PageDown - new horizontal
Done.
- add new setting to
Esc Key Function
: "First Close Current &Split View, If Any" (under---
in the end of Esc Key Function's submenu, as with View > Highlight Current Selection), enabled by default (if current view can't be closed and this is enabled then Escape does nothing)
Done.
For discussion: currently the first (initial) view is special in that it can't be closed. How hard is it to make it closeable as well (as long as there are at least 2 views)?
Done.
Additional improvement added: reduced flickering when creating/deleting split views. It is still seen with some GPUs but changing DisplayTechnology
to 0 (GDI) removes it entirely.
Research Scintilla features related to split view, i.e. splitting a Notepad2 window into multiple smaller areas that all display different portions of the opened file, with different scroll position and selection.
For example, a window can be split into 3 areas:
User can resize these areas by dragging splitters (thin resizers) between them.