mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ui: add TODO for non-working terminal linewrap
Note: this has not been working since the TUI reimplementation
This commit is contained in:
parent
989b585e10
commit
2134396074
@ -4226,25 +4226,7 @@ win_line (
|
||||
LineOffset[screen_row] + screen_Columns)
|
||||
== 2))
|
||||
) {
|
||||
/* First make sure we are at the end of the screen line,
|
||||
* then output the same character again to let the
|
||||
* terminal know about the wrap. If the terminal doesn't
|
||||
* auto-wrap, we overwrite the character. */
|
||||
if (ui_current_col() != wp->w_width)
|
||||
screen_char(LineOffset[screen_row - 1]
|
||||
+ (unsigned)Columns - 1,
|
||||
screen_row - 1, (int)(Columns - 1));
|
||||
|
||||
/* When there is a multi-byte character, just output a
|
||||
* space to keep it simple. */
|
||||
if (ScreenLines[LineOffset[screen_row - 1]
|
||||
+ (Columns - 1)][1] != 0) {
|
||||
ui_putc(' ');
|
||||
} else {
|
||||
ui_puts(ScreenLines[LineOffset[screen_row - 1] + (Columns - 1)]);
|
||||
}
|
||||
/* force a redraw of the first char on the next line */
|
||||
ScreenAttrs[LineOffset[screen_row]] = (sattr_T)-1;
|
||||
ui_add_linewrap(screen_row-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -403,6 +403,32 @@ void ui_cursor_goto(int new_row, int new_col)
|
||||
pending_cursor_update = true;
|
||||
}
|
||||
|
||||
void ui_add_linewrap(int row)
|
||||
{
|
||||
// TODO(bfredl): check that this actually still works
|
||||
// and move to TUI module in that case.
|
||||
#if 0
|
||||
// First make sure we are at the end of the screen line,
|
||||
// then output the same character again to let the
|
||||
// terminal know about the wrap. If the terminal doesn't
|
||||
// auto-wrap, we overwrite the character.
|
||||
if (ui_current_col() != Columns) {
|
||||
screen_char(LineOffset[row] + (unsigned)Columns - 1, row,
|
||||
(int)(Columns - 1));
|
||||
}
|
||||
|
||||
// When there is a multi-byte character, just output a
|
||||
// space to keep it simple. */
|
||||
if (ScreenLines[LineOffset[row] + (Columns - 1)][1] != 0) {
|
||||
ui_putc(' ');
|
||||
} else {
|
||||
ui_puts(ScreenLines[LineOffset[row] + (Columns - 1)]);
|
||||
}
|
||||
// force a redraw of the first char on the next line
|
||||
ScreenAttrs[LineOffset[row+1]] = (sattr_T)-1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ui_mode_info_set(void)
|
||||
{
|
||||
Array style = mode_style_array();
|
||||
|
Loading…
Reference in New Issue
Block a user