mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
screen: add const and reindent update_debug_signs()
This commit is contained in:
@@ -543,12 +543,12 @@ static void update_finish(void)
|
|||||||
updating_screen = FALSE;
|
updating_screen = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_debug_sign(buf_T *buf, linenr_T lnum)
|
void update_debug_sign(const buf_T *const buf, const linenr_T lnum)
|
||||||
{
|
{
|
||||||
int doit = FALSE;
|
bool doit = false;
|
||||||
win_foldinfo.fi_level = 0;
|
win_foldinfo.fi_level = 0;
|
||||||
|
|
||||||
/* update/delete a specific mark */
|
// update/delete a specific mark
|
||||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||||
if (buf != NULL && lnum > 0) {
|
if (buf != NULL && lnum > 0) {
|
||||||
if (wp->w_buffer == buf && lnum >= wp->w_topline
|
if (wp->w_buffer == buf && lnum >= wp->w_topline
|
||||||
@@ -565,7 +565,7 @@ void update_debug_sign(buf_T *buf, linenr_T lnum)
|
|||||||
redraw_win_later(wp, VALID);
|
redraw_win_later(wp, VALID);
|
||||||
}
|
}
|
||||||
if (wp->w_redr_type != 0) {
|
if (wp->w_redr_type != 0) {
|
||||||
doit = TRUE;
|
doit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,13 +573,14 @@ void update_debug_sign(buf_T *buf, linenr_T lnum)
|
|||||||
// happening (recursive call), messages on the screen or still starting up.
|
// happening (recursive call), messages on the screen or still starting up.
|
||||||
if (!doit
|
if (!doit
|
||||||
|| updating_screen
|
|| updating_screen
|
||||||
|| State == ASKMORE || State == HITRETURN
|
|| State == ASKMORE
|
||||||
|
|| State == HITRETURN
|
||||||
|| msg_scrolled
|
|| msg_scrolled
|
||||||
|| starting) {
|
|| starting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update all windows that need updating */
|
// update all windows that need updating
|
||||||
update_prepare();
|
update_prepare();
|
||||||
|
|
||||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||||
|
Reference in New Issue
Block a user