• R/O
  • SSH
  • HTTPS

yash: Commit


Commit MetaInfo

Revision3856 (tree)
Time2018-09-15 00:57:11
Authormagicant

Log Message

Count line number in multi-line arithmetic expansion (#38587)

Change Summary

Incremental Difference

--- yash/trunk/NEWS (revision 3855)
+++ yash/trunk/NEWS (revision 3856)
@@ -13,6 +13,8 @@
1313 + The prompt string now can be defined with the $YASH_PS...
1414 variables.
1515 = The default value of $PS1 has been changed.
16+ * The line number is now correctly counted in arithmetic
17+ expansions that contain newlines.
1618 . Updated the sample initialization script (yashrc):
1719 = The prompt strings are now defined with the $YASH_PS...
1820 variables.
--- yash/trunk/parser.c (revision 3855)
+++ yash/trunk/parser.c (revision 3856)
@@ -1932,6 +1932,9 @@
19321932 continue;
19331933 }
19341934 break;
1935+ case L'\n':
1936+ ps->info->lineno++;
1937+ break;
19351938 case L'$':
19361939 case L'`':
19371940 MAKE_WORDUNIT_STRING;
Show on old repository browser