From 675ee38ebc75960c9897171837b7dc8ee695f492 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Tue, 5 Jul 2016 00:57:53 +0530 Subject: [PATCH] utils: allow more separators at Go To Line At Go To Line between line and column numbers allow separators other than comma, specifically - the letter m, period, slash, space and semicolon. Former two are adjacent to comma on a keyboard and latter three are commonly used separators; taking away unnecessary restrictiveness. This accomplishes http://savannah.gnu.org/bugs/?48305. Signed-off-by: Rishabh Dave --- src/utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 4411499..178006b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -87,7 +87,10 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column) assert(str != NULL); - comma = strchr(str, ','); + while (*str == ' ') + ++str; + + comma = strpbrk(str, "m,./ ;"); if (comma != NULL && column != NULL) { if (!parse_num(comma + 1, column)) -- 2.9.0