Skip to content

Commit a5ed662

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 9063021 + a0ed84a commit a5ed662

6 files changed

Lines changed: 29 additions & 5 deletions

File tree

runtime/doc/options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6664,6 +6664,7 @@ A jump table for the options with a short description can be found at |Q_op|.
66646664
c don't give |ins-completion-menu| messages. For example,
66656665
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
66666666
"Pattern not found", "Back at original", etc.
6667+
q use "recording" instead of "recording @a"
66676668

66686669
This gives you the opportunity to avoid that a change between buffers
66696670
requires you to hit <Enter>, but still gives as useful a message as

runtime/doc/repeat.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,13 @@ To abort this type CTRL-C twice.
109109
q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"}
110110
(uppercase to append). The 'q' command is disabled
111111
while executing a register, and it doesn't work inside
112-
a mapping and |:normal|. {Vi: no recording}
112+
a mapping and |:normal|.
113+
114+
Note: If the register being used for recording is also
115+
used for |y| and |p| the result is most likely not
116+
what is expected, because the put will paste the
117+
recorded macro and the yank will overwrite the
118+
recorded macro. {Vi: no recording}
113119

114120
q Stops recording. (Implementation note: The 'q' that
115121
stops recording is not stored in the register, unless

src/ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ do_record(c)
10801080
retval = FAIL;
10811081
else
10821082
{
1083-
Recording = TRUE;
1083+
Recording = c;
10841084
showmode();
10851085
regname = c;
10861086
retval = OK;

src/option.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@
213213
#define SHM_ATTENTION 'A' /* no ATTENTION messages */
214214
#define SHM_INTRO 'I' /* intro messages */
215215
#define SHM_COMPLETIONMENU 'c' /* completion menu messages */
216-
#define SHM_ALL "rmfixlnwaWtToOsAIc" /* all possible flags for 'shm' */
216+
#define SHM_RECORDING 'q' /* short recording message */
217+
#define SHM_ALL "rmfixlnwaWtToOsAIcq" /* all possible flags for 'shm' */
217218

218219
/* characters for p_go: */
219220
#define GO_ASEL 'a' /* autoselect */

src/screen.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ static void redraw_block __ARGS((int row, int end, win_T *wp));
163163
static int win_do_lines __ARGS((win_T *wp, int row, int line_count, int mayclear, int del));
164164
static void win_rest_invalid __ARGS((win_T *wp));
165165
static void msg_pos_mode __ARGS((void));
166+
static void recording_mode __ARGS((int attr));
166167
#if defined(FEAT_WINDOWS)
167168
static void draw_tabline __ARGS((void));
168169
#endif
@@ -10192,7 +10193,7 @@ showmode()
1019210193
#endif
1019310194
)
1019410195
{
10195-
MSG_PUTS_ATTR(_("recording"), attr);
10196+
recording_mode(attr);
1019610197
need_clear = TRUE;
1019710198
}
1019810199

@@ -10256,11 +10257,24 @@ unshowmode(force)
1025610257
{
1025710258
msg_pos_mode();
1025810259
if (Recording)
10259-
MSG_PUTS_ATTR(_("recording"), hl_attr(HLF_CM));
10260+
recording_mode(hl_attr(HLF_CM));
1026010261
msg_clr_eos();
1026110262
}
1026210263
}
1026310264

10265+
static void
10266+
recording_mode(attr)
10267+
int attr;
10268+
{
10269+
MSG_PUTS_ATTR(_("recording"), attr);
10270+
if (!shortmess(SHM_RECORDING))
10271+
{
10272+
char_u s[4];
10273+
sprintf((char *)s, " @%c", Recording);
10274+
MSG_PUTS_ATTR(s, attr);
10275+
}
10276+
}
10277+
1026410278
#if defined(FEAT_WINDOWS)
1026510279
/*
1026610280
* Draw the tab pages line at the top of the Vim window.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ static char *(features[]) =
756756

757757
static int included_patches[] =
758758
{ /* Add new patch number below this line */
759+
/**/
760+
925,
759761
/**/
760762
924,
761763
/**/

0 commit comments

Comments
 (0)