File tree Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -949,7 +949,7 @@ function! s:VimLParser.find_command() abort
949
949
endif
950
950
endfor
951
951
952
- if self .neovim
952
+ if self .neovim
953
953
for x in self .neovim_additional_commands
954
954
if stridx (x .name, name) == # 0 && len (name) >= x .minlen
955
955
unlet cmd
@@ -966,7 +966,7 @@ function! s:VimLParser.find_command() abort
966
966
endif
967
967
endfor
968
968
endif
969
-
969
+
970
970
" FIXME: user defined command
971
971
if (cmd is # s: NIL || cmd.name == # ' Print' ) && name = ~# ' ^[A-Z]'
972
972
let name .= self .reader.read_alnum ()
@@ -4681,8 +4681,10 @@ endfunction
4681
4681
4682
4682
function ! s: StringReader .read_nonwhite () abort
4683
4683
let r = ' '
4684
- while ! s: iswhite (self .peekn (1 ))
4684
+ let ch = self .peekn (1 )
4685
+ while ! s: iswhite (ch ) && ch !=# ' '
4685
4686
let r .= self .getn (1 )
4687
+ let ch = self .peekn (1 )
4686
4688
endwhile
4687
4689
return r
4688
4690
endfunction
Original file line number Diff line number Diff line change @@ -4102,8 +4102,10 @@ StringReader.prototype.read_white = function() {
4102
4102
4103
4103
StringReader . prototype . read_nonwhite = function ( ) {
4104
4104
var r = "" ;
4105
- while ( ! iswhite ( this . peekn ( 1 ) ) ) {
4105
+ var ch = this . peekn ( 1 ) ;
4106
+ while ( ! iswhite ( ch ) && ch != "" ) {
4106
4107
r += this . getn ( 1 ) ;
4108
+ var ch = this . peekn ( 1 ) ;
4107
4109
}
4108
4110
return r ;
4109
4111
}
Original file line number Diff line number Diff line change @@ -3319,8 +3319,10 @@ def read_white(self):
3319
3319
3320
3320
def read_nonwhite (self ):
3321
3321
r = ""
3322
- while not iswhite (self .peekn (1 )):
3322
+ ch = self .peekn (1 )
3323
+ while not iswhite (ch ) and ch != "" :
3323
3324
r += self .getn (1 )
3325
+ ch = self .peekn (1 )
3324
3326
return r
3325
3327
3326
3328
def read_name (self ):
Original file line number Diff line number Diff line change 3
3
(excmd "normal gg")
4
4
(excmd "Usercmd x, y z 123")
5
5
(excmd "Usercmd! with bang")
6
+ (excmd "write ++enc=utf-8")
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ normal! gg
3
3
normal gg
4
4
Usercmd x , y z 123
5
5
Usercmd! with bang
6
+ write ++ enc = utf- 8
You can’t perform that action at this time.
0 commit comments