mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	| @@ -272,7 +272,7 @@ void screenclear(void) | ||||
| /// to be re-emitted: avoid clearing the prompt from the message grid. | ||||
| static bool cmdline_number_prompt(void) | ||||
| { | ||||
|   return !ui_has(kUIMessages) && State == MODE_CMDLINE && get_cmdline_info()->mouse_used != NULL; | ||||
|   return !ui_has(kUIMessages) && (State & MODE_CMDLINE) && get_cmdline_info()->mouse_used != NULL; | ||||
| } | ||||
|  | ||||
| /// Set dimensions of the Nvim application "screen". | ||||
| @@ -374,8 +374,8 @@ void screen_resize(int width, int height) | ||||
|     // - in Ex mode, don't redraw anything. | ||||
|     // - Otherwise, redraw right now, and position the cursor. | ||||
|     if (State == MODE_ASKMORE || State == MODE_EXTERNCMD || exmode_active | ||||
|         || (State == MODE_CMDLINE && get_cmdline_info()->one_key)) { | ||||
|       if (State == MODE_CMDLINE) { | ||||
|         || ((State & MODE_CMDLINE) && get_cmdline_info()->one_key)) { | ||||
|       if (State & MODE_CMDLINE) { | ||||
|         update_screen(); | ||||
|       } | ||||
|       if (msg_grid.chars) { | ||||
|   | ||||
| @@ -3062,7 +3062,7 @@ void repeat_message(void) | ||||
|   if (State == MODE_ASKMORE) { | ||||
|     msg_moremsg(true);          // display --more-- message again | ||||
|     msg_row = Rows - 1; | ||||
|   } else if (State == MODE_CMDLINE && confirm_msg != NULL) { | ||||
|   } else if ((State & MODE_CMDLINE) && confirm_msg != NULL) { | ||||
|     display_confirm_msg();      // display ":confirm" message again | ||||
|     msg_row = Rows - 1; | ||||
|   } else if (State == MODE_EXTERNCMD) { | ||||
|   | ||||
| @@ -185,11 +185,11 @@ void get_mode(char *buf) | ||||
|   int i = 0; | ||||
|  | ||||
|   if (State == MODE_HITRETURN || State == MODE_ASKMORE || State == MODE_SETWSIZE | ||||
|       || (State == MODE_CMDLINE && get_cmdline_info()->one_key)) { | ||||
|       || ((State & MODE_CMDLINE) && get_cmdline_info()->one_key)) { | ||||
|     buf[i++] = 'r'; | ||||
|     if (State == MODE_ASKMORE) { | ||||
|       buf[i++] = 'm'; | ||||
|     } else if (State == MODE_CMDLINE) { | ||||
|     } else if (State & MODE_CMDLINE) { | ||||
|       buf[i++] = '?'; | ||||
|     } | ||||
|   } else if (State == MODE_EXTERNCMD) { | ||||
|   | ||||
| @@ -541,7 +541,7 @@ void ui_flush(void) | ||||
|  | ||||
|   cmdline_ui_flush(); | ||||
|  | ||||
|   if (State != MODE_CMDLINE && curwin->w_floating && curwin->w_config.hide) { | ||||
|   if (!(State & MODE_CMDLINE) && curwin->w_floating && curwin->w_config.hide) { | ||||
|     if (!was_busy) { | ||||
|       ui_call_busy_start(); | ||||
|       was_busy = true; | ||||
|   | ||||
| @@ -1141,6 +1141,16 @@ describe('cmdline redraw', function() | ||||
|     ]]) | ||||
|     command('redraw') | ||||
|     screen:expect_unchanged() | ||||
|  | ||||
|     command('set keymap=dvorak') | ||||
|     feed('<C-^>') | ||||
|     command('redraw') | ||||
|     screen:expect_unchanged() | ||||
|  | ||||
|     feed('<C-^>') | ||||
|     command('set keymap&') | ||||
|     command('redraw') | ||||
|     screen:expect_unchanged() | ||||
|   end) | ||||
|  | ||||
|   it('substitute confirm prompt does not scroll', function() | ||||
|   | ||||
| @@ -9587,6 +9587,15 @@ describe('float window', function() | ||||
|           ]] | ||||
|         }) | ||||
|       end | ||||
|  | ||||
|       command('set keymap=dvorak') | ||||
|       feed('<C-^>') | ||||
|       screen:expect_unchanged() | ||||
|  | ||||
|       feed('<C-^>') | ||||
|       command('set keymap&') | ||||
|       screen:expect_unchanged() | ||||
|  | ||||
|       feed('<ESC>') | ||||
|  | ||||
|       -- Show cursor after switching to a normal window (hide=false). | ||||
|   | ||||
| @@ -365,7 +365,7 @@ for _, v in ipairs(ext_keys) do | ||||
|   expect_keys[v] = true | ||||
| end | ||||
|  | ||||
| --- @class test.function.ui.screen.Expect | ||||
| --- @class test.functional.ui.screen.Expect | ||||
| --- | ||||
| --- Expected screen state (string). Each line represents a screen | ||||
| --- row. Last character of each row (typically "|") is stripped. | ||||
| @@ -460,7 +460,7 @@ end | ||||
| --- or keyword args (supports more options): | ||||
| ---    screen:expect({ grid=[[...]], cmdline={...}, condition=function() ... end }) | ||||
| --- | ||||
| --- @param expected string|function|test.function.ui.screen.Expect | ||||
| --- @param expected string|function|test.functional.ui.screen.Expect | ||||
| --- @param attr_ids? table<integer,table<string,any>> | ||||
| function Screen:expect(expected, attr_ids, ...) | ||||
|   --- @type string, fun() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zeertzjq
					zeertzjq