comparison src/mouse.c @ 29732:89e1d67814a9 v9.0.0206

patch 9.0.0206: redraw flags are not named specifically Commit: https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 14 14:17:45 2022 +0100 patch 9.0.0206: redraw flags are not named specifically Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 Aug 2022 15:30:05 +0200
parents b11130c6e694
children b37b74ea8dee
comparison
equal deleted inserted replaced
29731:df7f360215b7 29732:89e1d67814a9
622 jump_flags = MOUSE_MAY_STOP_VIS; 622 jump_flags = MOUSE_MAY_STOP_VIS;
623 } 623 }
624 if (jump_flags) 624 if (jump_flags)
625 { 625 {
626 jump_flags = jump_to_mouse(jump_flags, NULL, which_button); 626 jump_flags = jump_to_mouse(jump_flags, NULL, which_button);
627 update_curbuf(VIsual_active ? INVERTED : VALID); 627 update_curbuf(VIsual_active ? UPD_INVERTED : UPD_VALID);
628 setcursor(); 628 setcursor();
629 out_flush(); // Update before showing popup menu 629 out_flush(); // Update before showing popup menu
630 } 630 }
631 # ifdef FEAT_MENU 631 # ifdef FEAT_MENU
632 show_popupmenu(); 632 show_popupmenu();
1025 } 1025 }
1026 } 1026 }
1027 curwin->w_set_curswant = TRUE; 1027 curwin->w_set_curswant = TRUE;
1028 } 1028 }
1029 if (is_click) 1029 if (is_click)
1030 redraw_curbuf_later(INVERTED); // update the inversion 1030 redraw_curbuf_later(UPD_INVERTED); // update the inversion
1031 } 1031 }
1032 else if (VIsual_active && !old_active) 1032 else if (VIsual_active && !old_active)
1033 { 1033 {
1034 if (mod_mask & MOD_MASK_ALT) 1034 if (mod_mask & MOD_MASK_ALT)
1035 VIsual_mode = Ctrl_V; 1035 VIsual_mode = Ctrl_V;
1162 // The popup menu may overlay the window, need to redraw it. 1162 // The popup menu may overlay the window, need to redraw it.
1163 // TODO: Would be more efficient to only redraw the windows that are 1163 // TODO: Would be more efficient to only redraw the windows that are
1164 // overlapped by the popup menu. 1164 // overlapped by the popup menu.
1165 if (pum_visible() && did_scroll) 1165 if (pum_visible() && did_scroll)
1166 { 1166 {
1167 redraw_all_later(NOT_VALID); 1167 redraw_all_later(UPD_NOT_VALID);
1168 ins_compl_show_pum(); 1168 ins_compl_show_pum();
1169 } 1169 }
1170 1170
1171 if (!EQUAL_POS(curwin->w_cursor, tpos)) 1171 if (!EQUAL_POS(curwin->w_cursor, tpos))
1172 { 1172 {
1595 } 1595 }
1596 #endif 1596 #endif
1597 if (flags & MOUSE_MAY_STOP_VIS) 1597 if (flags & MOUSE_MAY_STOP_VIS)
1598 { 1598 {
1599 end_visual_mode_keep_button(); 1599 end_visual_mode_keep_button();
1600 redraw_curbuf_later(INVERTED); // delete the inversion 1600 redraw_curbuf_later(UPD_INVERTED); // delete the inversion
1601 } 1601 }
1602 #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) 1602 #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
1603 // Continue a modeless selection in another window. 1603 // Continue a modeless selection in another window.
1604 if (cmdwin_type != 0 && row < curwin->w_winrow) 1604 if (cmdwin_type != 0 && row < curwin->w_winrow)
1605 return IN_OTHER_WIN; 1605 return IN_OTHER_WIN;
1736 ) 1736 )
1737 #endif 1737 #endif
1738 && (flags & MOUSE_MAY_STOP_VIS)))) 1738 && (flags & MOUSE_MAY_STOP_VIS))))
1739 { 1739 {
1740 end_visual_mode_keep_button(); 1740 end_visual_mode_keep_button();
1741 redraw_curbuf_later(INVERTED); // delete the inversion 1741 redraw_curbuf_later(UPD_INVERTED); // delete the inversion
1742 } 1742 }
1743 #ifdef FEAT_CMDWIN 1743 #ifdef FEAT_CMDWIN
1744 if (cmdwin_type != 0 && wp != curwin) 1744 if (cmdwin_type != 0 && wp != curwin)
1745 { 1745 {
1746 // A click outside the command-line window: Use modeless 1746 // A click outside the command-line window: Use modeless
1840 { 1840 {
1841 // before moving the cursor for a left click, stop Visual mode 1841 // before moving the cursor for a left click, stop Visual mode
1842 if (flags & MOUSE_MAY_STOP_VIS) 1842 if (flags & MOUSE_MAY_STOP_VIS)
1843 { 1843 {
1844 end_visual_mode_keep_button(); 1844 end_visual_mode_keep_button();
1845 redraw_curbuf_later(INVERTED); // delete the inversion 1845 redraw_curbuf_later(UPD_INVERTED); // delete the inversion
1846 } 1846 }
1847 1847
1848 #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) 1848 #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
1849 // Continue a modeless selection in another window. 1849 // Continue a modeless selection in another window.
1850 if (cmdwin_type != 0 && row < curwin->w_winrow) 1850 if (cmdwin_type != 0 && row < curwin->w_winrow)
1902 #ifdef FEAT_DIFF 1902 #ifdef FEAT_DIFF
1903 check_topfill(curwin, FALSE); 1903 check_topfill(curwin, FALSE);
1904 #endif 1904 #endif
1905 curwin->w_valid &= 1905 curwin->w_valid &=
1906 ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP); 1906 ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);
1907 redraw_later(VALID); 1907 redraw_later(UPD_VALID);
1908 row = 0; 1908 row = 0;
1909 } 1909 }
1910 else if (row >= curwin->w_height) 1910 else if (row >= curwin->w_height)
1911 { 1911 {
1912 count = 0; 1912 count = 0;
1940 } 1940 }
1941 } 1941 }
1942 #ifdef FEAT_DIFF 1942 #ifdef FEAT_DIFF
1943 check_topfill(curwin, FALSE); 1943 check_topfill(curwin, FALSE);
1944 #endif 1944 #endif
1945 redraw_later(VALID); 1945 redraw_later(UPD_VALID);
1946 curwin->w_valid &= 1946 curwin->w_valid &=
1947 ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP); 1947 ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);
1948 row = curwin->w_height - 1; 1948 row = curwin->w_height - 1;
1949 } 1949 }
1950 else if (row == 0) 1950 else if (row == 0)
1966 int off = LineOffset[prev_row] + prev_col; 1966 int off = LineOffset[prev_row] + prev_col;
1967 1967
1968 // Only use ScreenCols[] after the window was redrawn. Mainly matters 1968 // Only use ScreenCols[] after the window was redrawn. Mainly matters
1969 // for tests, a user would not click before redrawing. 1969 // for tests, a user would not click before redrawing.
1970 // Do not use when 'virtualedit' is active. 1970 // Do not use when 'virtualedit' is active.
1971 if (curwin->w_redr_type <= VALID_NO_UPDATE && !virtual_active()) 1971 if (curwin->w_redr_type <= UPD_VALID_NO_UPDATE && !virtual_active())
1972 col_from_screen = ScreenCols[off]; 1972 col_from_screen = ScreenCols[off];
1973 #ifdef FEAT_FOLDING 1973 #ifdef FEAT_FOLDING
1974 // Remember the character under the mouse, it might be a '-' or '+' in 1974 // Remember the character under the mouse, it might be a '-' or '+' in
1975 // the fold column. 1975 // the fold column.
1976 mouse_char = ScreenLines[off]; 1976 mouse_char = ScreenLines[off];