From cefca2396003bdc69c0fd0eb90258e56148bf256 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 21 Nov 2012 00:36:21 +0100 Subject: A command to get ASCII code from buffer (at position DOT+n) classic TECO's append-buffer command is not supported * currently, num_sign is implied for A, that is -A will retrieve the value before DOT, while "A" will retrieve after (not at) DOT --- parser.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/parser.cpp b/parser.cpp index 04c7a3e..92e6ac7 100644 --- a/parser.cpp +++ b/parser.cpp @@ -925,6 +925,15 @@ StateStart::custom(gchar chr) throw (Error) break; } + case 'A': + BEGIN_EXEC(this); + v = interface.ssm(SCI_GETCURRENTPOS) + + expressions.pop_num_calc(); + if (!Validate::pos(v)) + throw RangeError("A"); + expressions.push(interface.ssm(SCI_GETCHARAT, v)); + break; + default: throw SyntaxError(chr); } -- cgit v1.2.3