Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Add ncurses_cursor ui_options. #1393
well the terminal will still handle the hardware cursor this just offers a way to set the visual representation which seems to be common for console based ui. moreover this assures consistent user experience with a default setting. there was some confusion when 91ed57c broke the colorschemes and failed to highlight the cursor.
+1 on this
Even if there is always a one-char wide selection, when we press 'a', we clearly see the selection before the cursor and a cursor which is one-char wide after that selection. The cursor in this case is not part of the selection.
I think it makes a lot of sense to change the cursor shape to reflect that you are in insert mode. It is far easier to see than the "insert" that appears in the status bar. Also, as a user coming from neovim with NVIM_TUI_ENABLE_CURSOR_SHAPE, I find that it is a bit of a regression.
I actually tried to make this pull request work. The problem is that the cursor is rendered by the Window class, it just highlights the cursor block with a different color. The NCursesUI class disables the terminal cursor rendering in its constructor.
Cursors must be rendered by the Window class because when there are multiple ones, the terminal will not be able to handle them. So I made a compromise and made the Window class render all cursors except the main one and let it be rendered by NCursesUI.
I am not particularly happy with the code, so I am leaving what I have done here in case anyone has a better idea: https://github.com/blastrock/kakoune/commit/ae1b92469148c37c57846c307dd4dd7a9bb47052