From e2c1d44a7f91ad21ea7d72ef0858c92ed2a5919b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 6 Feb 2018 20:29:08 +1100 Subject: [PATCH] Fix parsing of percent tokens with unicode separators --- src/command_manager.cc | 2 +- test/regression/1829-unicode-as-string-delimiter/cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command_manager.cc b/src/command_manager.cc index 64523b94..be2aa79e 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -205,7 +205,7 @@ Token parse_percent_token(Reader& reader) { ++reader; const auto type_start = reader.pos; - while (reader and isalpha(*reader)) + while (reader and iswalpha(*reader)) ++reader; StringView type_name = reader.substr_from(type_start); diff --git a/test/regression/1829-unicode-as-string-delimiter/cmd b/test/regression/1829-unicode-as-string-delimiter/cmd index c42d3140..a9658251 100644 --- a/test/regression/1829-unicode-as-string-delimiter/cmd +++ b/test/regression/1829-unicode-as-string-delimiter/cmd @@ -1 +1 @@ -:exec i %дabcд esc> +:exec i %•abc• esc>