From 753dacacbcc2d45d35a044bfe2512fc4cd564b5c Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 18 Feb 2013 23:17:18 +0100 Subject: clean up QRegister vs. Buffer redundancies using TECODocument class * also encapsulates data properly (previously there were many public attributes to avoid permission issues) * new class also cares about saving/and restoring scroll state. now, buffer/q-reg edits and temporary accesses do not reset the scroll state anymore. --- src/ring.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ring.cpp') diff --git a/src/ring.cpp b/src/ring.cpp index 8654686..138714f 100644 --- a/src/ring.cpp +++ b/src/ring.cpp @@ -233,7 +233,7 @@ Ring::edit(gint64 id) if (!buffer) return false; - current_save_dot(); + current_doc_update(); QRegisters::current = NULL; current = buffer; @@ -249,7 +249,7 @@ Ring::edit(const gchar *filename) { Buffer *buffer = find(filename); - current_save_dot(); + current_doc_update(); QRegisters::current = NULL; if (buffer) { @@ -488,7 +488,7 @@ Ring::close(void) { Buffer *buffer = current; - buffer->dot = interface.ssm(SCI_GETCURRENTPOS); + buffer->update(); close(buffer); current = buffer->next() ? : buffer->prev(); /* transfer responsibility to UndoToken object */ -- cgit v1.2.3