Permalink
Browse files

Remember current tab number after closing vdebug, close #23

  • Loading branch information...
1 parent 0a77dce commit 2bac500eb22f10d2006dc9ce7867a467150091a9 @joonty committed Feb 28, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 plugin/python/vdebug/ui/vimui.py
@@ -15,6 +15,7 @@ def __init__(self,breakpoints):
self.breakpoint_store = breakpoints
self.emptybuffer = None
self.breakpointwin = BreakpointWindow(self,'rightbelow 7new')
+ self.current_tab = "1"
def open(self):
if self.is_open:
@@ -25,6 +26,8 @@ def open(self):
if cur_buf_name is None:
cur_buf_name = ''
+ self.current_tab = vim.eval("tabpagenr()")
+
vim.command('silent tabnew ' + cur_buf_name)
self.tabnr = vim.eval("tabpagenr()")
@@ -151,6 +154,7 @@ def close(self):
vdebug.log.Log.remove_logger('WindowLogger')
vim.command('silent! '+self.tabnr+'tabc!')
+ vim.command('tabn '+self.current_tab)
self.watchwin = None
self.stackwin = None

0 comments on commit 2bac500

Please sign in to comment.