aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-13 23:52:01 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-13 23:52:01 +0100
commit66bde3c43d543cbadd617f68240f4bd8c22d10d9 (patch)
treefa45084a22bb67249f43503d24fae930cb4062f7 /parser.cpp
parent074c64232f8be3bc34b40a9d5e92f28e6aa922fb (diff)
downloadsciteco-66bde3c43d543cbadd617f68240f4bd8c22d10d9.tar.gz
EF command to close a buffer
can be rubbed out!!! this works because when a buffer is closed, it is not deallocated but transferred to the undo token object which then (if run) reinserts it into the ring list. if the undo token is destroyed before it is run (eg. <ESC><ESC> pressed), the buffer will finally be deallocated.
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/parser.cpp b/parser.cpp
index 296763c..b71ba53 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -957,6 +957,13 @@ State *
StateECommand::custom(gchar chr)
{
switch (g_ascii_toupper(chr)) {
+ case 'F':
+ BEGIN_EXEC(&States::start);
+ if (!ring.current)
+ return NULL; /* FIXME */
+ ring.close();
+ break;
+
case 'X':
BEGIN_EXEC(&States::start);
undo.push_var<bool>(quit_requested);