comparison src/register.c @ 30005:bb0e525e1393 v9.0.0340

patch 9.0.0340: the 'cmdheight' zero support causes too much trouble Commit: https://github.com/vim/vim/commit/a2a8973e51a0052bb52e43a2b22e7ecdecc32003 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 31 14:46:18 2022 +0100 patch 9.0.0340: the 'cmdheight' zero support causes too much trouble Problem: The 'cmdheight' zero support causes too much trouble. Solution: Revert support for 'cmdheight' being zero.
author Bram Moolenaar <Bram@vim.org>
date Wed, 31 Aug 2022 16:00:05 +0200
parents 31c598083364
children 37aa9fd2ed72
comparison
equal deleted inserted replaced
30004:40b34edf15c2 30005:bb0e525e1393
369 int 369 int
370 do_record(int c) 370 do_record(int c)
371 { 371 {
372 char_u *p; 372 char_u *p;
373 static int regname; 373 static int regname;
374 static int changed_cmdheight = FALSE;
375 yankreg_T *old_y_previous, *old_y_current; 374 yankreg_T *old_y_previous, *old_y_current;
376 int retval; 375 int retval;
377 376
378 if (reg_recording == 0) // start recording 377 if (reg_recording == 0) // start recording
379 { 378 {
384 { 383 {
385 reg_recording = c; 384 reg_recording = c;
386 showmode(); 385 showmode();
387 regname = c; 386 regname = c;
388 retval = OK; 387 retval = OK;
389
390 if (p_ch < 1)
391 {
392 // Enable macro indicator temporarily
393 set_option_value((char_u *)"ch", 1L, NULL, 0);
394 update_screen(UPD_VALID);
395
396 changed_cmdheight = TRUE;
397 }
398 } 388 }
399 } 389 }
400 else // stop recording 390 else // stop recording
401 { 391 {
402 // Get the recorded key hits. K_SPECIAL and CSI will be escaped, this 392 // Get the recorded key hits. K_SPECIAL and CSI will be escaped, this
419 409
420 retval = stuff_yank(regname, p); 410 retval = stuff_yank(regname, p);
421 411
422 y_previous = old_y_previous; 412 y_previous = old_y_previous;
423 y_current = old_y_current; 413 y_current = old_y_current;
424 }
425
426 if (changed_cmdheight)
427 {
428 // Restore cmdheight
429 set_option_value((char_u *)"ch", 0L, NULL, 0);
430 redraw_all_later(UPD_CLEAR);
431 } 414 }
432 } 415 }
433 return retval; 416 return retval;
434 } 417 }
435 418