projects
/
pygdb.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixing bug, when getting text from terminal: started at line -1
[pygdb.git]
/
pygdb.vim
diff --git
a/pygdb.vim
b/pygdb.vim
index 80cf77dbda77a47727df8bd5687e5da378a2acdd..fe0626ff04f12b9359f87dbcef63393babe3cb17 100644
(file)
--- a/
pygdb.vim
+++ b/
pygdb.vim
@@
-9,21
+9,18
@@
let s:ScriptLocation = expand("<sfile>")
python << >>
import gtk
python << >>
import gtk
+import os
import string
import sys
import threading
import string
import sys
import threading
-
import vim
import vim
-#Do not use a ~ for home directory
-pygdbdir = "/home/shuber/projekte/pygdb"
-sys.path.append(pygdbdir)
-
import Configuration
import Configuration
-#Breakpoint positions: List of dictionaries of form {"signnum" : , "file" : , "lineno":, "cond" : }
+#Breakpoint positions: List of dictionaries of form
+#{"signnum" : , "file" : , "lineno":, "cond" : }
gdbBps = []
signnum = 0
clientcmd = ""
gdbBps = []
signnum = 0
clientcmd = ""
@@
-56,7
+53,7
@@
def gdbToggleBreakpoint(lineno=None, file=None):
if lineno==None:
lineno = vim.current.window.cursor[0]
if file==None:
if lineno==None:
lineno = vim.current.window.cursor[0]
if file==None:
- file =
vim.current.window.buffer.name
+ file =
getCurrentFile()
#Determine index of breakpoint
bpidx = gdbGetBreakpoint( file, lineno )
#Determine index of breakpoint
bpidx = gdbGetBreakpoint( file, lineno )
@@
-84,7
+81,7
@@
def gdbBreakpointCond(lineno=None, file=None, cond=None):
if lineno==None:
lineno = vim.current.window.cursor[0]
if file==None:
if lineno==None:
lineno = vim.current.window.cursor[0]
if file==None:
- file =
vim.current.window.buffer.name
+ file =
getCurrentFile()
#Determine index of breakpoint
bpidx = gdbGetBreakpoint( file, lineno )
#Determine index of breakpoint
bpidx = gdbGetBreakpoint( file, lineno )
@@
-109,6
+106,11
@@
def gdbBreakpointCond(lineno=None, file=None, cond=None):
gdbBps += [b]
gdbBps += [b]
+def getCurrentFile():
+ return vim.current.window.buffer.name
+
+
+
def gdbNewSignnum():
global signnum
signnum += 1
def gdbNewSignnum():
global signnum
signnum += 1
@@
-125,10
+127,8
@@
def gdbGetBreakpoint(file, lineno):
>>
>>
-highlight ExecutionLine term=bold ctermbg=DarkGreen ctermfg=White
highlight BreakPoint term=inverse ctermbg=DarkCyan ctermfg=Black
highlight BreakPoint term=inverse ctermbg=DarkCyan ctermfg=Black
-sign define ExecutionLine text==> texthl=ExecutionLine linehl=ExecutionLine
sign define BreakPoint text=! texthl=BreakPoint linehl=BreakPoint
sign define CondBreakPoint text=? texthl=BreakPoint linehl=BreakPoint
sign define BreakPoint text=! texthl=BreakPoint linehl=BreakPoint
sign define CondBreakPoint text=? texthl=BreakPoint linehl=BreakPoint