summaryrefslogtreecommitdiff
path: root/src/window.hh
AgeCommit message (Collapse)Author
2024-09-16Rename Window::display_position to display_coordMaxime Coste
2024-09-16Do not return beginning of buffer whenever display to buffer coord failsMaxime Coste
Use an empty Optional to show that resolution failed and just do not do anything in the mouse event handler in that case.
2023-09-08Use last display setup instead of recomputing for window_rangeMaxime Coste
Fixes #4964
2023-08-27Remove Window::force_redraw()Maxime Coste
This was mostly redundant with Client::force_redraw.
2023-08-27Small code cleanup in winow.cc/hhMaxime Coste
2023-08-23Revert "Only make cursor visible after buffer or selection change"Maxime Coste
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
2023-08-16Only make cursor visible after buffer or selection changeMaxime Coste
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
2019-12-16Fix window_range expansionMaxime Coste
It relied on the buffer first char being visible, and could trigger segfaults when that was not the case.
2019-12-16Fix WinResize hook getting triggered during urgent event processingMaxime Coste
WinResize hooks could be triggered during shell evaluation, leading to any state potentially getting mutated after a shell evaluation call.
2019-02-17Run WinClose hook before putting the window into trashMaxime Coste
2018-10-23Refactor Hook management to have a well defined list of hooksMaxime Coste
Hooks are now an enum class instead of passing strings around.
2018-06-19Change Search completion to display on top of the modelineMaxime Coste
2018-06-12Remove unneeded Window::m_range post refactoringMaxime Coste
2018-06-11Add position offset to Window to limit moves with search menu styleMaxime Coste
Window can be resized with an "offset_pos" flag, which means that the resize took place on the top left corner of the window, leading to a change in current window position. This is treated as temporary and the position change is stored in a m_position_offset field. That allows the ncurses UI to offset the position when it displays a Search menu, so that the window does not constantly scroll when the search menu open/closes. The window will only scroll if it needs to in order to keep the main selectin visible.
2018-05-09Mark Client, Window, Buffer and OptionManager as finalMaxime Coste
Avoids warning about non virtual destructor calls on them, as they have a vtable due to OptionManagerWatcher.
2018-04-10Redraw window when the face definition changedMaxime Coste
Hash the current face state and store that hash to check for changes.
2018-04-06Make compute_display_setup methods constMaxime Coste
2017-10-28Move highlighters into ScopesMaxime Coste
That means we can now have highlighters active at global, buffer, and window scope. The add-highlighter and remove-highlighter syntax changed to take the parent path (scope/group/...) as a mandatory argument, superseeding the previous -group switch.
2017-06-16Hide info/menu when they are anchored to an invisible buffer coordMaxime Coste
Fixes #1444
2017-06-09Fix wrapping supportMaxime Coste
2017-05-22Remove virtual destructor from OptionManagerWatcherMaxime Coste
We should never destruct anything through an OptionManagerWatcher pointer, so having all those destructor virtual makes no sense.
2017-05-07Slight highlighting related code cleanupMaxime Coste
2017-05-07Make scrolling around work more correctly with wrappingMaxime Coste
2017-05-07Make Wrap highlighter only wrap on window width.Maxime Coste
2017-05-07Introduce highlighting phases and display setup computationMaxime Coste
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.
2017-05-07Do not use any display information to determine where the cursor movesMaxime Coste
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-11-28Add more memory domains to certain dataMaxime Coste
2016-11-24Forward client name to contexts created for write-allMaxime Coste
Fixes #937
2016-10-01Support codepoints of variable widthMaxime Coste
Add a ColumnCount type and use it in place of CharCount whenever more appropriate, take column size of codepoints into account for vertical movements and docstring wrapping. Fixes #811
2016-05-09Keep a pointer to current client in windows so that window hooks can access itMaxime Coste
2016-02-03Do not use a hash to determine if a window must be redrawnMaxime Coste
Collision happens Fixes #569
2015-11-02Support horizontal centering in view commands (using m)Maxime Coste
Fixes #442
2015-06-22Refactor slightly window redrawingMaxime Coste
2015-06-21Rework window redraw handling, should redraw window less oftenMaxime Coste
2015-06-04Add support for Default faceMaxime Coste
The Default face is used to set default color values, if set to default (the default), refers to terminal default colors.
2015-03-18Add a display coord to buffer coord method to WindowMaxime Coste
2015-03-05Use a IdMap for storing hooksMaxime Coste
The number of hook names is small (<20), using an UnorderedMap is overkill, and prevents using StringView for key searching.
2015-02-19Rename safe_ptr and ref_ptr to SafePtr and RefPtrMaxime Coste
2015-01-26Release display buffers when a window is added to free listMaxime Coste
2014-12-18Do not register timers for transient input handlersMaxime Coste
2014-11-12Cleanup includesMaxime Coste
2014-10-30Add scope class and encapsulate Options, Keymaps, Aliases and Hooks in itMaxime Coste
2014-10-30Add scoped aliasesMaxime Coste
aliases are now stored in window, buffer, or globally.
2014-10-22Refactor highlighters, use an interface with virtual methodsMaxime Coste
2014-09-09Add support for target column preservationMaxime Coste
Fixes #64
2014-08-12Make safe_ptr able to track callstacksMaxime Coste
The code stays disabled, as the performance penalty is quite high, but can be enabled to help debugging safe pointers.
2014-06-10Replace FunctionGroup template with HighlighterGroup classMaxime Coste
2014-05-07Refactor LineAndColumn coordinatesMaxime Coste
BufferCoord -> ByteCoord DisplayCoord -> CharCoord Moved their definition along with LineAndColumn into coord.hh
2013-12-20Get rid of Editor for goodMaxime Coste
ClientManager now stores only the free windows, clients take ownership of its own.