mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
api: add API for themes
co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
This commit is contained in:
@@ -107,7 +107,7 @@ void redraw_for_cursorline(win_T *wp)
|
||||
&& !pum_visible()) {
|
||||
if (wp->w_p_rnu) {
|
||||
// win_line() will redraw the number column only.
|
||||
redraw_win_later(wp, VALID);
|
||||
redraw_later(wp, VALID);
|
||||
}
|
||||
if (win_cursorline_standout(wp)) {
|
||||
if (wp->w_redr_type <= VALID && wp->w_last_cursorline != 0) {
|
||||
@@ -117,7 +117,7 @@ void redraw_for_cursorline(win_T *wp)
|
||||
redrawWinline(wp, wp->w_last_cursorline);
|
||||
redrawWinline(wp, wp->w_cursor.lnum);
|
||||
} else {
|
||||
redraw_win_later(wp, SOME_VALID);
|
||||
redraw_later(wp, SOME_VALID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,7 +172,7 @@ void update_topline(void)
|
||||
// If the buffer is empty, always set topline to 1.
|
||||
if (BUFEMPTY()) { // special case - file is empty
|
||||
if (curwin->w_topline != 1) {
|
||||
redraw_later(NOT_VALID);
|
||||
redraw_later(curwin, NOT_VALID);
|
||||
}
|
||||
curwin->w_topline = 1;
|
||||
curwin->w_botline = 2;
|
||||
@@ -326,12 +326,14 @@ void update_topline(void)
|
||||
dollar_vcol = -1;
|
||||
if (curwin->w_skipcol != 0) {
|
||||
curwin->w_skipcol = 0;
|
||||
redraw_later(NOT_VALID);
|
||||
} else
|
||||
redraw_later(VALID);
|
||||
/* May need to set w_skipcol when cursor in w_topline. */
|
||||
if (curwin->w_cursor.lnum == curwin->w_topline)
|
||||
redraw_later(curwin, NOT_VALID);
|
||||
} else {
|
||||
redraw_later(curwin, VALID);
|
||||
}
|
||||
// May need to set w_skipcol when cursor in w_topline.
|
||||
if (curwin->w_cursor.lnum == curwin->w_topline) {
|
||||
validate_cursor();
|
||||
}
|
||||
}
|
||||
|
||||
*so_ptr = save_so;
|
||||
@@ -439,7 +441,7 @@ void changed_window_setting_win(win_T *wp)
|
||||
wp->w_lines_valid = 0;
|
||||
changed_line_abv_curs_win(wp);
|
||||
wp->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP|VALID_TOPLINE);
|
||||
redraw_win_later(wp, NOT_VALID);
|
||||
redraw_later(wp, NOT_VALID);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -455,8 +457,8 @@ void set_topline(win_T *wp, linenr_T lnum)
|
||||
wp->w_topline_was_set = true;
|
||||
wp->w_topfill = 0;
|
||||
wp->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_TOPLINE);
|
||||
/* Don't set VALID_TOPLINE here, 'scrolloff' needs to be checked. */
|
||||
redraw_later(VALID);
|
||||
// Don't set VALID_TOPLINE here, 'scrolloff' needs to be checked.
|
||||
redraw_later(wp, VALID);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -634,7 +636,7 @@ void validate_virtcol_win(win_T *wp)
|
||||
if (wp->w_p_cuc
|
||||
&& !pum_visible()
|
||||
)
|
||||
redraw_win_later(wp, SOME_VALID);
|
||||
redraw_later(wp, SOME_VALID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -830,7 +832,7 @@ void curs_columns(
|
||||
curwin->w_leftcol = new_leftcol;
|
||||
win_check_anchored_floats(curwin);
|
||||
// screen has to be redrawn with new curwin->w_leftcol
|
||||
redraw_later(NOT_VALID);
|
||||
redraw_later(curwin, NOT_VALID);
|
||||
}
|
||||
}
|
||||
curwin->w_wcol -= curwin->w_leftcol;
|
||||
@@ -934,13 +936,14 @@ void curs_columns(
|
||||
} else {
|
||||
curwin->w_skipcol = 0;
|
||||
}
|
||||
if (prev_skipcol != curwin->w_skipcol)
|
||||
redraw_later(NOT_VALID);
|
||||
if (prev_skipcol != curwin->w_skipcol) {
|
||||
redraw_later(curwin, NOT_VALID);
|
||||
}
|
||||
|
||||
/* Redraw when w_virtcol changes and 'cursorcolumn' is set */
|
||||
if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
|
||||
&& !pum_visible()) {
|
||||
redraw_later(SOME_VALID);
|
||||
redraw_later(curwin, SOME_VALID);
|
||||
}
|
||||
|
||||
// now w_leftcol is valid, avoid check_cursor_moved() thinking otherwise
|
||||
@@ -2013,7 +2016,7 @@ int onepage(Direction dir, long count)
|
||||
}
|
||||
}
|
||||
|
||||
redraw_later(VALID);
|
||||
redraw_later(curwin, VALID);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2199,7 +2202,7 @@ void halfpage(bool flag, linenr_T Prenum)
|
||||
check_topfill(curwin, !flag);
|
||||
cursor_correct();
|
||||
beginline(BL_SOL | BL_FIX);
|
||||
redraw_later(VALID);
|
||||
redraw_later(curwin, VALID);
|
||||
}
|
||||
|
||||
void do_check_cursorbind(void)
|
||||
@@ -2247,7 +2250,7 @@ void do_check_cursorbind(void)
|
||||
}
|
||||
// Correct cursor for multi-byte character.
|
||||
mb_adjust_cursor();
|
||||
redraw_later(VALID);
|
||||
redraw_later(curwin, VALID);
|
||||
|
||||
// Only scroll when 'scrollbind' hasn't done this.
|
||||
if (!curwin->w_p_scb) {
|
||||
|
Reference in New Issue
Block a user