[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kate] kate/app: Make :q in vim mode behave more like in vim when splits are open
From:       Erlend Hamberg <ehamberg () gmail ! com>
Date:       2013-02-19 4:29:44
Message-ID: 20130219042944.2ED8CA60CB () git ! kde ! org
[Download RAW message or body]

Git commit 2bc47bb74d8276d76f8ed948cc49010b1996cbcc by Erlend Hamberg.
Committed on 19/02/2013 at 05:23.
Pushed by ehamberg into branch 'master'.

Make :q in vim mode behave more like in vim when splits are open

Patch by Fabian Kosmale:
The patch changes Kate's behaviour on :q so that it won't close a file,
when a split is open, but instead closes the split.

M  +8    -4    kate/app/kateappcommands.cpp

http://commits.kde.org/kate/2bc47bb74d8276d76f8ed948cc49010b1996cbcc

diff --git a/kate/app/kateappcommands.cpp b/kate/app/kateappcommands.cpp
index 617ec60..6c07196 100644
--- a/kate/app/kateappcommands.cpp
+++ b/kate/app/kateappcommands.cpp
@@ -107,10 +107,14 @@ bool KateAppCommands::exec(KTextEditor::View *view, c=
onst QString &cmd, QString
                 view->document()->documentSave();
             }
 =

-            if (KateDocManager::self()->documents() > 1)
-                QTimer::singleShot(0, mainWin, SLOT(slotFileClose()));
-            else
-                QTimer::singleShot(0, mainWin, SLOT(slotFileQuit()));
+            if (mainWin->viewManager()->count() > 1) {
+              QTimer::singleShot(0, mainWin->viewManager(), SLOT(slotClose=
CurrentViewSpace()));
+            } else {
+                if (KateDocManager::self()->documents() > 1)
+                  QTimer::singleShot(0, mainWin, SLOT(slotFileClose()));
+                else
+                  QTimer::singleShot(0, mainWin, SLOT(slotFileQuit()));
+            }
         }
     } else if (re_exit.exactMatch(command)) {
         if (!re_exit.cap(1).isEmpty()) { // a[ll]
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic