summaryrefslogtreecommitdiff
path: root/src/ncurses_ui.hh
AgeCommit message (Collapse)Author
2021-07-12Rename NCursesUI to TerminalUIMaxime Coste
2021-07-12Replace ncurses with a naive custom terminal backendMaxime Coste
2021-04-05[feat] add ui_options: padding_char & padding_fillnojhan
In some cases, it may be difficult to easily spot the area out of the buffer (bad color scheme, small font, superimposed windows). This patch adds two ncurses ui_options to bypass this problem: - `ncurses_padding_char`, to configure the padding character, - `ncurses_padding_fill`, to indicate whether to fill the padding line (or to display a single character). The default config is the legacy one (a single "~").
2020-03-27Untie focus reporting and mouse handlingMaxime Coste
2019-11-22Add support for markup in info boxesMaxime Coste
Fixes #2552
2019-11-13Re-merge clear_to_eol in drawMaxime Coste
2019-11-05Split clearing to end of line out of NCursesUI::Window::drawMaxime Coste
Explicitely clear instead of relying on a brittle heuristic.
2019-09-26Fix some clang warningsMaxime Coste
2019-09-26Remove unneeded NCursesUI::Window::mark_dirty and redrawsMaxime Coste
A bug in client.cc was always forcing full redraws of the windows, leading to much more terminal output traffic than necessary.
2019-09-25Additional NCursesUI code cleanupsMaxime Coste
2019-09-25Avoid unnecessary allocations in NCursesUI::Window::draw callsMaxime Coste
Pass an ArrayView<DisplayAtom> instead of a DisplayLine& so that the newly common case of passing a single atom does not require constructing a Vector.
2019-09-25Refactor NCursesUI::Window to reduce the exposed methodsMaxime Coste
This should make an alternate implementation simpler as less state has to be tracked.
2019-09-25Do not set O_NONBLOCK on stdinMaxime Coste
It is not necessary, and impacts also writing to stdout, leading to broken display on old ncurses versions. Fixes #3087
2019-09-24Restore stdin status flags on suspend and quitMaxime Coste
Those flags are shared with the parent process, so the non-block flag added impacts their execution.
2019-09-16Restore palette before suspendMaxime Coste
2019-09-16Fix multi-client server suspendMaxime Coste
2019-09-16Fix broken input after suspendMaxime Coste
2019-09-16Setup terminal raw mode without going through ncursesMaxime Coste
2019-09-16Get rid of ncurses based input parsing in favor of custom codeMaxime Coste
2019-09-07Rework custom CSI parsing code and add support for SGR (1006) mouseMaxime Coste
This will support parsing mouse coordinates bigger than 255 - 32. And get correct release support.
2019-09-05Extract most ncurses calls into NCursesUI::Window methodsMaxime Coste
Try to isolate ncurses as much as possible to explore alternate terminal UI implementation.
2019-08-19Make scrolling speed configurableMaxime Coste
The UI now can send a 'Scroll' key, whose value is the scrolling amount encoded as a signed integer. This replaces the MouseWheelUp and MouseWheelDown keys. The NCursesUI now has a ncurses_wheel_scroll_amount ui_option that controls that amount, it can be negative to swap scrolling direction. Fixes #3045
2018-12-09Refactor parsing of keys and introduce a builtin key parser modeMaxime Coste
By setting the ncurses_builtin_key_parser ui_option to true, we can disable ncurses parsing of key strokes to get less portable parsing but support for more complex modifiers.
2018-06-20Do not draw menu if it would hide prompt contentMaxime Coste
2018-06-19Change Search completion to display on top of the modelineMaxime 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-06-03Add MenuStyle::Search that prevents the menu from hiding buffer textMaxime Coste
Fixes #2042
2018-04-29Rework the way UI can trigger a client quittingMaxime Coste
Add a UserInterface::is_ok method and return false on SIGHUP/stdin closing/socket dropping This should be cleaner and more robust than the previous SIGHUP handling code. Fixes #1594
2018-04-11NCursesUI: Add support for shifted function keysMaxime Coste
Shifted function keys are not well standardized around terminals, Shift F(N) usually returns F(X) + N, with X=12 on xterm, X=10 on rxvt-unicode... Default to X=12 and make it configuable through the ncurses_shift_function_key ui_option. This fixes what #1898 tried to.
2017-04-12Place hardware terminal cursor at the current main cursor/prompt cursor positionMaxime Coste
Fixes #1318 Also fixes https://gitlab.com/gnachman/iterm2/issues/5408
2017-03-07Replace IdMap with HashMapMaxime Coste
2017-03-07Replace uses of UnorderedMap with HashMapMaxime Coste
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-12-30Add a ncurses_change_colors option that can disable color palette changeMaxime Coste
Closes #1057
2016-12-10Fix one definition rule violation in ncurses_ui.hhMaxime Coste
The memory domain of Vector<DisplayBuffer> was different depending on if display_buffer.hh has been included or not.
2016-11-29Simplify greatly UI input handlingMaxime Coste
This round trip through an input callback expected to call is_key_available and get_key was overcomplicated, just send the keys as they arrive, the client is already buffering due to urgent event mode.
2016-11-14More correct handling of SIGHUP while suspendedMaxime Coste
Fixes #833
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-04-11Remove padding control options from ncurses uiMaxime Coste
2016-04-11Merge remote-tracking branch 'lenormf/buffer-padding'Maxime Coste
2016-03-07Handle <c-l> redrawing on the server sideMaxime Coste
That way we can force a redraw at any moment, including during batch execution.
2016-02-27Slight refactor in ncurses_ui, group info and menu data in structsMaxime Coste
2016-02-17Cleanup/fix some codeFrank LENORMAND
2016-02-17Allow users to chose how the buffers are paddedFrank LENORMAND
2015-12-05Improve info box placement behaviour in some corner casesMaxime Coste
2015-11-05Change ncurses wheel down default button to 5Maxime Coste
2015-10-13Restore info box after a resize as wellMaxime Coste
Fixes #425
2015-10-13Try to restore menu after a resizeMaxime Coste
2015-10-08Store color/color pairs mapping in the ncurses ui instanceMaxime Coste
2015-10-05Use DisplayLine for menu choicesMaxime Coste