A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/75f4741db92768db1db937fd4dbce15a01b65042 below:

remove reinterpreted ALT/META chords from recorded macro · neovim/neovim@75f4741 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+19

-2

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+19

-2

lines changed Original file line number Diff line number Diff line change

@@ -1598,8 +1598,9 @@ int vgetc(void)

1598 1598

if (!no_mapping && KeyTyped && !(State & TERM_FOCUS)

1599 1599

&& (mod_mask == MOD_MASK_ALT || mod_mask == MOD_MASK_META)) {

1600 1600

mod_mask = 0;

1601 -

ins_char_typebuf(c, 0);

1602 -

ins_char_typebuf(ESC, 0);

1601 +

int len = ins_char_typebuf(c, 0);

1602 +

(void)ins_char_typebuf(ESC, 0);

1603 +

ungetchars(len + 3); // The ALT/META modifier takes three more bytes

1603 1604

continue;

1604 1605

}

1605 1606 Original file line number Diff line number Diff line change

@@ -104,4 +104,20 @@ describe('meta-keys #8226 #13042', function()

104 104

eq({ 0, 2, 1, 0, }, funcs.getpos('.'))

105 105

eq('nt', eval('mode(1)'))

106 106

end)

107 + 108 +

it('ALT/META when recording a macro #13235', function()

109 +

feed('ifoo<CR>bar<CR>baz<Esc>gg0')

110 +

-- <M-"> is reinterpreted as <Esc>"

111 +

feed('qrviw"ayC// This is some text: <M-">apq')

112 +

expect([[

113 +

// This is some text: foo

114 +

bar

115 +

baz]])

116 +

-- Should not insert an extra double quote when replaying

117 +

feed('j0@rj0@@')

118 +

expect([[

119 +

// This is some text: foo

120 +

// This is some text: bar

121 +

// This is some text: baz]])

122 +

end)

107 123

end)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4