Commits

ZyX_I committed 5cc53c3

ftplugin/aurumstatus: Added aurum_statwincmd option

Comments (0)

Files changed (3)

   - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line409-0)).
 
   - Commiting changes ([:AuCommit](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line102-0)), commit messages are remembered in case of 
-    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line1049-0)).
+    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line1060-0)).
 
   - Obtaining various URL’s out of remote repository URL (like URL of the HTML 
     version of the current file with URL fragment pointing to the current line 
     arguments should use existing status window or open a new one.
     Default: 1.
 
+statwincmd                                                *g:aurum_statwincmd*
+    String, one of “j”, “k”, “h”, “l”, “w”, “W”, “t”, “b”, “p”, “c”.
+    Determines what window should be switched to when running |aurum://status| 
+    mappings. See |window-move-cursor| for the description of most keys.
+    No error will be given if there is no window in desired direction, 
+    mappings will just use status buffer’s own window.
+    Value “c” is special: window will be |:close|d and cursor will be moved to 
+    whatever window vim selects. In other cases status window won’t be closed.
+    Ignored if there is only one window left.
+    Default: “c”.
+
 remembermsg                                              *g:aurum_remembermsg*
     Bool. Determines whether message typed in commit buffer should be saved 
     when commit is performed in case of rollback. This message will appear in 

ftplugin/aurumstatus.vim

             \                   '@%aurum/edit': '1.2',
             \                 '@%aurum/commit': '1.0',
             \                     '@/mappings': '0.0',
+            \                      '@/options': '0.0',
             \                           '@/os': '0.0',})
 let s:_messages={
             \  'nopars': 'Revision %s has no parents',
         \}
+let s:_oprefix='aurum'
+let s:_options={
+            \'statwincmd': {'default': 'c',
+            \               'checker': 'match /\v^[jkhlwWtbpc]$/'},
+        \}
 "▶1 runmap
 let s:noacttypes={
             \    'open': ['deleted'],
         if isrecord
             let [lwnr, rwnr, swnr]=bvar.getwnrs()
             execute lwnr.'wincmd w'
-        else
-            wincmd c
+        elseif winnr('$')>1
+            execute 'wincmd' s:_f.getoption('statwincmd')
         endif
     endif
     if a:action is# 'open'