From f2b8e780f0e3c0634644887639f97adbf7c1c9dc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 27 Feb 2010 15:21:29 +0900 Subject: * match.c (match_lines): Bugfix in freeform directive. If the virtual line is partially matched, the remainder of the line is folded back into list form. In this case, the data line number must be incremented. Otherwise the calling context may conclude that no progress was made, and skip a line of input. I.e. the unmatched part of the input is a new line, even if there had originally been no line break at that point. --- ChangeLog | 11 +++++++++++ match.c | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 654122fb..a1825d53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-02-27 Kaz Kylheku + + * match.c (match_lines): Bugfix in freeform directive. + If the virtual line is partially matched, the remainder of + the line is folded back into list form. In this case, the + data line number must be incremented. Otherwise the calling + context may conclude that no progress was made, and + skip a line of input. I.e. the unmatched part of the input + is a new line, even if there had originally + been no line break at that point. + 2010-02-27 Kaz Kylheku * lib.h (split_str_sep): Declared. diff --git a/match.c b/match.c index 5c083a6d..32418442 100644 --- a/match.c +++ b/match.c @@ -1004,8 +1004,10 @@ repeat_spec_same_data: return nil; } - if (nump(success)) + if (nump(success)) { data = lazy_str_get_trailing_list(ff_dataline, success); + data_lineno++; + } bindings = new_bindings; } -- cgit v1.2.3