Permalink
Browse files

Merge branch 'dev' of github.com:joonty/vdebug into dev

  • Loading branch information...
2 parents 0809151 + 33f1eb8 commit 00cf6e533f1e2f89ab528305b6fbc01a2ff7419c @joonty committed Dec 17, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 plugin/python/vdebug/ui/vimui.py
@@ -13,15 +13,20 @@ def __init__(self,breakpoints):
vdebug.ui.interface.Ui.__init__(self)
self.is_open = False
self.breakpoint_store = breakpoints
+ self.emptybuffer = None
self.breakpointwin = BreakpointWindow(self,'rightbelow 7new')
def open(self):
if self.is_open:
return
self.is_open = True
- vim.command('silent tabnew')
+
+ cur_buf_name = vim.eval("bufname('%')")
+ if cur_buf_name is None:
+ cur_buf_name = ''
+
+ vim.command('silent tabnew ' + cur_buf_name)
self.tabnr = vim.eval("tabpagenr()")
- self.emptybuffer = vim.eval("bufwinnr(expand('%:p'))")
srcwin_name = self.__get_srcwin_name()
@@ -53,6 +58,9 @@ def set_source_position(self,file,lineno):
self.sourcewin.set_line(lineno)
self.sourcewin.place_pointer(lineno)
+ def __get_buf_list(self):
+ return vim.eval("range(1, bufnr('$'))")
+
def mark_as_stopped(self):
if self.is_open:
if self.sourcewin:
@@ -140,8 +148,6 @@ def close(self):
self.stackwin = None
self.statuswin = None
- vim.command('bwipeout'+self.emptybuffer)
-
class SourceWindow(vdebug.ui.interface.Window):
file = None

0 comments on commit 00cf6e5

Please sign in to comment.