| Age | Commit message (Collapse) | Author |
|
<memory> is a costly header we can avoid by just implementing
UniquePtr ourselves, which is a pretty straightforward in modern
C++, this saves around 10% of the compilation time here.
|
|
For WrapHighlighter to be able to take ReplaceRangesHighlighter
into account, it needs to run afterwards, moreover, moving
TabulationHighlighter to the replace pass means we should be able to
remove any tabulation specific handling from WrapHighlighter
Also move ShowWhitespaceHighlighter to this pass as it is designed
to replace TabulationHighlighter by running before (as builtin
highlighters run after non builtin ones for each passes)
|
|
Move the whole responsibility of making the cursor visible to the
window, removing cursor_pos from the display setup and resolving
the cursor location by finding it in the display buffer afterwards.
This simplifies hightlighters' do_compute_display_setup as they do
not need to compute the cursor location. Highlighting may run on
more lines than necessary after this change but this should be a
minor performance hit.
|
|
|
|
Lots of code includes buffer_utils.hh just for write_to_debug_buffer
which pulls many unnecessary dependencies. Reorganise to reduce
compile times.
|
|
ensure cursor is visible after user input except if the command
implementation opted-out. Hooks and timers should not enforce
visible cursor.
PageUp/PageDown and `<c-f>` / `<c-b>` commands still move the cursor
as this seemed a desired behaviour.
|
|
This is currently broken on various corner cases and breaks the
"master branch should be good for day to day work" implicit rule,
ongoing work to stabilize this feature will take place on the
no-cursor-move-on-scroll branch until its deemed ready.
This reverts commit 1e38045d702ec6eb2425016d9b02636270ab1b1e.
Closes #4963
|
|
Kakoune now does not touch cursors when scrolling. It checks
if either the buffer or selections has been modified since
last redraw.
Fixes #4124
Fixes #2844
|
|
Always start with full buffer lines and trim the display buffer at
the very end, treat non-range display atoms as non-trimable in that
case and keep track of how many columns are occupied by "widgets"
such as line numbers or flags.
Fixes #4659
|
|
Fixes #4367.
|
|
|
|
This allow replacing a highlighter in place, not loosing its current
position in its parent.
Fixes #3436
|
|
|
|
|
|
The highlighter name must be given as part of the path of the
highlighter, as the last element.
Fixes #1712
|
|
|
|
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.
colorscheme apply on global scope, which should be good enough for
now.
Fixes #1411
|
|
|
|
Some highlighters, such as wrap or line numbers, are not intended
to be used multiple times on the same display. Add support for unique
ids that are used by highlighters to disable themselves if another
unique highlighter with the same id is supposed to override them.
The usual highlighter "precedence" takes, place, that it, that most
nested highlighter will the the one to run (window in priority to
buffer in priority to global).
|
|
|
|
|
|
|
|
|
|
Validate that childs of HighlighterGroup are matching its passes.
|
|
|
|
Highlighters now run in 3 phases:
Wrap, Move, and Colorize. That way we guarantee the wrap
highlighter runs first, then eventual line numbers/flags,
and finally the colorizers.
We also run a `compute_display_setup` method thats responsible
for computing the lines that will be displayed, eventually
scrolling the view to ensure the cursor is visible.
|
|
|
|
|
|
|
|
|
|
This reverts commit b42de850314e7d76f873ddc7d64c5f7d2a30eb00.
|
|
|
|
|
|
As in upcoming std c++ array_view, ArrayView<T> points to mutable
data, use ArrayView<const T> or alias ConstArrayView<T> for const
data.
|
|
|
|
|
|
|
|
FunctionRegistry class
|
|
std::hash specialization is a pain to work with, stop using that, and
just specialize a 'size_t hash_value(const T&)' free function.
|
|
Regions highlighter can now correctly be applied to only subrange
of the buffer, fixing some corner cases in recursive regions.
|
|
|
|
|
|
|
|
When only highlighting for finding character position on screen
pass HighlightFlags::MoveOnly so that non moving highlighters do
not need to run.
|
|
|
|
|
|
* defhl <name> defines a shared highlighter
* addhl -def-group <name> adds highlighters to the defined highlighter
* addhl ref <name> add the defined highlighter to the window's ones
|
|
|
|
|
|
|