comparison src/structs.h @ 22886:38324d4f1c94 v8.2.1990

patch 8.2.1990: cursor position wrong in terminal popup with finished job Commit: https://github.com/vim/vim/commit/6a07644db30cb5f3d0c6dc5eb2c348b6289da553 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 15 20:32:58 2020 +0100 patch 8.2.1990: cursor position wrong in terminal popup with finished job Problem: Cursor position wrong in terminal popup with finished job. Solution: Only add the top and left offset when not done already. (closes #7298)
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 Nov 2020 20:45:03 +0100
parents 80bd5de5dcab
children 57b6427c18e4
comparison
equal deleted inserted replaced
22885:dc9330ed5a5c 22886:38324d4f1c94
3346 */ 3346 */
3347 linenr_T w_topline; // buffer line number of the line at the 3347 linenr_T w_topline; // buffer line number of the line at the
3348 // top of the window 3348 // top of the window
3349 char w_topline_was_set; // flag set to TRUE when topline is set, 3349 char w_topline_was_set; // flag set to TRUE when topline is set,
3350 // e.g. by winrestview() 3350 // e.g. by winrestview()
3351
3352 linenr_T w_botline; // number of the line below the bottom of
3353 // the window
3354
3351 #ifdef FEAT_DIFF 3355 #ifdef FEAT_DIFF
3352 int w_topfill; // number of filler lines above w_topline 3356 int w_topfill; // number of filler lines above w_topline
3353 int w_old_topfill; // w_topfill at last redraw 3357 int w_old_topfill; // w_topfill at last redraw
3354 int w_botfill; // TRUE when filler lines are actually 3358 int w_botfill; // TRUE when filler lines are actually
3355 // below w_topline (at end of file) 3359 // below w_topline (at end of file)
3358 colnr_T w_leftcol; // window column number of the left most 3362 colnr_T w_leftcol; // window column number of the left most
3359 // character in the window; used when 3363 // character in the window; used when
3360 // 'wrap' is off 3364 // 'wrap' is off
3361 colnr_T w_skipcol; // starting column when a single line 3365 colnr_T w_skipcol; // starting column when a single line
3362 // doesn't fit in the window 3366 // doesn't fit in the window
3367
3368 int w_empty_rows; // number of ~ rows in window
3369 #ifdef FEAT_DIFF
3370 int w_filler_rows; // number of filler rows at the end of the
3371 // window
3372 #endif
3363 3373
3364 /* 3374 /*
3365 * Layout of the window in the screen. 3375 * Layout of the window in the screen.
3366 * May need to add "msg_scrolled" to "w_winrow" in rare situations. 3376 * May need to add "msg_scrolled" to "w_winrow" in rare situations.
3367 */ 3377 */
3368 int w_winrow; // first row of window in screen 3378 int w_winrow; // first row of window in screen
3369 int w_height; // number of rows in window, excluding 3379 int w_height; // number of rows in window, excluding
3370 // status/command/winbar line(s) 3380 // status/command/winbar line(s)
3381
3371 int w_status_height; // number of status lines (0 or 1) 3382 int w_status_height; // number of status lines (0 or 1)
3372 int w_wincol; // Leftmost column of window in screen. 3383 int w_wincol; // Leftmost column of window in screen.
3373 int w_width; // Width of window, excluding separation. 3384 int w_width; // Width of window, excluding separation.
3374 int w_vsep_width; // Number of separator columns (0 or 1). 3385 int w_vsep_width; // Number of separator columns (0 or 1).
3386
3375 pos_save_T w_save_cursor; // backup of cursor pos and topline 3387 pos_save_T w_save_cursor; // backup of cursor pos and topline
3388
3376 #ifdef FEAT_PROP_POPUP 3389 #ifdef FEAT_PROP_POPUP
3377 int w_popup_flags; // POPF_ values 3390 int w_popup_flags; // POPF_ values
3378 int w_popup_handled; // POPUP_HANDLE[0-9] flags 3391 int w_popup_handled; // POPUP_HANDLE[0-9] flags
3379 char_u *w_popup_title; 3392 char_u *w_popup_title;
3380 poppos_T w_popup_pos; 3393 poppos_T w_popup_pos;
3431 int w_popup_mask_height; // height of w_popup_mask_cells 3444 int w_popup_mask_height; // height of w_popup_mask_cells
3432 int w_popup_mask_width; // width of w_popup_mask_cells 3445 int w_popup_mask_width; // width of w_popup_mask_cells
3433 # if defined(FEAT_TIMERS) 3446 # if defined(FEAT_TIMERS)
3434 timer_T *w_popup_timer; // timer for closing popup window 3447 timer_T *w_popup_timer; // timer for closing popup window
3435 # endif 3448 # endif
3436 #endif 3449
3437 3450 int w_flags; // WFLAG_ flags
3451
3452 # define WFLAG_WCOL_OFF_ADDED 1 // popup border and padding were added to
3453 // w_wcol
3454 # define WFLAG_WROW_OFF_ADDED 2 // popup border and padding were added to
3455 // w_wrow
3456 #endif
3438 3457
3439 /* 3458 /*
3440 * === start of cached values ==== 3459 * === start of cached values ====
3441 */ 3460 */
3442 /* 3461 /*
3472 * w_wrow and w_wcol specify the cursor position in the window. 3491 * w_wrow and w_wcol specify the cursor position in the window.
3473 * This is related to positions in the window, not in the display or 3492 * This is related to positions in the window, not in the display or
3474 * buffer, thus w_wrow is relative to w_winrow. 3493 * buffer, thus w_wrow is relative to w_winrow.
3475 */ 3494 */
3476 int w_wrow, w_wcol; // cursor position in window 3495 int w_wrow, w_wcol; // cursor position in window
3477
3478 linenr_T w_botline; // number of the line below the bottom of
3479 // the window
3480 int w_empty_rows; // number of ~ rows in window
3481 #ifdef FEAT_DIFF
3482 int w_filler_rows; // number of filler rows at the end of the
3483 // window
3484 #endif
3485 3496
3486 /* 3497 /*
3487 * Info about the lines currently in the window is remembered to avoid 3498 * Info about the lines currently in the window is remembered to avoid
3488 * recomputing it every time. The allocated size of w_lines[] is Rows. 3499 * recomputing it every time. The allocated size of w_lines[] is Rows.
3489 * Only the w_lines_valid entries are actually valid. 3500 * Only the w_lines_valid entries are actually valid.