aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index b675abfb7d..2d752eade7 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1908,6 +1908,13 @@ bool do_mouse(oparg_T *oap, int c, int dir, long count, bool fixindent)
StlClickDefinition *click_defs = in_status_line ? wp->w_status_click_defs
: wp->w_winbar_click_defs;
+ if (in_status_line && global_stl_height() > 0) {
+ // global statusline is displayed for the current window,
+ // and spans the whole screen.
+ click_defs = curwin->w_status_click_defs;
+ click_col = mouse_col;
+ }
+
if (click_defs != NULL) {
switch (click_defs[click_col].type) {
case kStlClickDisabled:
@@ -2474,7 +2481,7 @@ size_t find_ident_at_pos(win_T *wp, linenr_T lnum, colnr_T startcol, char_u **te
col = 0;
// Search for point of changing multibyte character class.
this_class = mb_get_class(ptr);
- while (ptr[col] != NUL
+ while (ptr[col] != NUL // -V781
&& ((i == 0
? mb_get_class(ptr + col) == this_class
: mb_get_class(ptr + col) != 0)
@@ -2803,7 +2810,7 @@ void pop_showcmd(void)
static void display_showcmd(void)
{
- if (p_ch < 1 && !ui_has(kUIMessages)) {
+ if (!ui_has_messages()) {
return;
}
@@ -2915,10 +2922,11 @@ void check_scrollbind(linenr_T topline_diff, long leftcol_diff)
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
curwin = wp;
curbuf = curwin->w_buffer;
- // skip original window and windows with 'noscrollbind'
+ // skip original window and windows with 'noscrollbind'
if (curwin == old_curwin || !curwin->w_p_scb) {
continue;
}
+
// do the vertical scroll
if (want_ver) {
if (old_curwin->w_p_diff && curwin->w_p_diff) {
@@ -3478,7 +3486,8 @@ void scroll_redraw(int up, long count)
redraw_later(curwin, VALID);
}
-/// Get the count specified after a 'z' command.
+/// Get the count specified after a 'z' command. Only the 'z<CR>', 'zl', 'zh',
+/// 'z<Left>', and 'z<Right>' commands accept a count after 'z'.
/// @return true to process the 'z' command and false to skip it.
static bool nv_z_get_count(cmdarg_T *cap, int *nchar_arg)
{
@@ -5094,6 +5103,7 @@ static void nv_brackets(cmdarg_T *cap)
} else if (cap->nchar == '\'' || cap->nchar == '`') {
// "['", "[`", "]'" and "]`": jump to next mark
fmark_T *fm = pos_to_mark(curbuf, NULL, curwin->w_cursor);
+ assert(fm != NULL);
fmark_T *prev_fm;
for (n = cap->count1; n > 0; n--) {
prev_fm = fm;