diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-24 04:57:26 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-24 05:07:06 +0100 |
commit | 1e5115b0b40bcf57501d4b0b5dce8e7ecd61432d (patch) | |
tree | 0dc00efad34dcc3a013ca26612fa759298ed9490 /src/ring.cpp | |
parent | d503c3b07c2157658f699294c44ad5be244727a5 (diff) | |
download | sciteco-1e5115b0b40bcf57501d4b0b5dce8e7ecd61432d.tar.gz |
Q-Register loading and saving using the IOView class
* EW can save Q-Registers now
* the new E% may be used to save a q-register without making it
the current document
Diffstat (limited to 'src/ring.cpp')
-rw-r--r-- | src/ring.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ring.cpp b/src/ring.cpp index e7f7d75..df80246 100644 --- a/src/ring.cpp +++ b/src/ring.cpp @@ -372,7 +372,7 @@ StateEditFile::done(const gchar *str) } /*$ - * EW$ -- Save or rename current buffer + * EW$ -- Save current buffer or Q-Register * EWfile$ * * Saves the current buffer to disk. @@ -381,6 +381,13 @@ StateEditFile::done(const gchar *str) * the buffer is saved with the specified file name * and is renamed in the ring. * + * The EW command also works if the current document + * is a Q-Register, i.e. a Q-Register is edited. + * In this case, the string contents of the current + * Q-Register are saved to <file>. + * Q-Registers have no notion of associated file names, + * so <file> must be always specified. + * * In interactive mode, EW is executed immediately and * may be rubbed out. * In order to support that, \*(ST creates so called @@ -411,8 +418,7 @@ StateSaveFile::done(const gchar *str) BEGIN_EXEC(&States::start); if (QRegisters::current) - throw Error("Cannot save Q-Register"); -// QRegisters::current->save(str); + QRegisters::current->save(str); else ring.current->save(*str ? str : NULL); |