开发者

Using gdb within Emacs breaks horizontal scrolling

Emacs version I am using: GNU Emacs 22.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.12.9)

Invoking gdb from emacs breaks the horizontal scrolling in emacs windows. I invoke gdb by entering M-x gdb and then accept the default (only adding name of my binary at the end, e.g.): gdb --annotate=3 unittest

At some point after the debugger is invoked (not immediately), the automatic horizontal scrolling no longer works.

By automatic horizontal scrolling I mean that the expected behaviour is: follow the cursor, shifting the viewport left or right when necessary. For example: when the cursor is positioned at the end of a long line (say column 200) the viewing area of th开发者_如何学Ce window is moved to the right, such that column 200 is visible. If I then press 'Home' and the cursor jumps to beginning of line - the window also follows it and I can see the left-most column of the buffer.

Pasting my entire .emacs file here is probably a bad idea so I just searched for entries related to hscroll:

(custom-set-variables
 '(column-number-mode t)
 '(cua-mode t nil (cua-base))
 '(hscroll-global-mode t nil (hscroll))
 '(hscroll-margin 5)
 '(hscroll-mode-name " ")
 '(hscroll-snap-threshold 30)
 '(indent-tabs-mode nil)
    ...

... but I can attach it here or email it if anyone thinks it is needed...

Hope someone knows how to fix this as coz it's a real pain - every time I use the debugger I need to restart emacs... I am pretty sure this problem was not present in version 20....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜