aboutsummaryrefslogtreecommitdiff
path: root/ui-terminal-curses.c
AgeCommit message (Collapse)AuthorFilesLines
2018-02-18Support COLOR_PAIRS > SHRT_MAXMichael Forney1-2/+2
In ncurses 6.1, the TERMINAL structure was updated[0] to store data in `int` instead of `short`, and terminfo definitions for 256-color terminals were updated from `pairs#32767` to `pairs#0x10000`. However, since vis stores the value of COLOR_PAIRS in a short (ncurses internally stores it as an int), it is now overflowing into negative, breaking color support completely. The standard `init_pair` entry points still use `short` for their parameters, so just restrict the pairs to `SHRT_MAX` during allocation. [0] http://invisible-island.net/ncurses/announce-6.1.html#h4-new-library
2017-04-14vis: make certain operations interruptible with <C-c>Marc André Tanner1-1/+1
As currently implemented this will only work for operations which are individually fast, but repeated many times (e.g. `1000000itext<Escape>`).
2017-03-22ui: try to fix job control issues with certain shellsMarc André Tanner1-2/+7
Make sure that curses and libtermkey don't fight over the terminal state. Also send use SIGTSTP instead of SIGSTOP. Previously certain shells (e.g. csh, dash) would get stuck after the editor process was suspended for the second time. Not completely sure whether this is correct, but it seems to work in my limited tests.
2017-03-16ui: further cleanup display codeMarc André Tanner1-3/+3
2017-03-15ui: fix compiler warningMarc André Tanner1-1/+1
2017-03-14Restructure display codeMarc André Tanner1-0/+286
Use pull instead of push based model for display code. Previously view.c was calling into the ui frontend code, with the new scheme this switches around: the necessary data is fetched by the ui as necessary. The UI independent display code is moved out of view.c/ui-curses.c into vis.c. The cell styles are now directly embedded into the Cell struct. New UI styles are introduced for: - status bar (focused / non-focused) - info message - window separator - EOF symbol You will have to update your color themes. The terminal output code is further abstracted into a generic ui-terminal.c part which keeps track of the whole in-memory cell matrix and #includes ui-terminal-curses.c for the actual terminal output. This architecture currently assumes that there are no overlapping windows. It will also allow non-curses based terminal user interfaces.