zk-phi / sublimity

Smooth-scrolling and minimap like sublime editor
496 stars 26 forks source link

Buffer width is truncated to default when scroll. #22

Open zyqhi opened 9 years ago

zyqhi commented 9 years ago

When I open a file and work with sublimity-attractive-centering, lines in the buffer are centralized. But when I scroll the buffer, lines aligns to left again. After scrolled, lines are centralized again. It causes a flash of the screen.

Is it a bug? or any else?

zk-phi commented 9 years ago

It seems a bug, but I couldn't reproduce on my environment. Does it happens also on the vanilla Emacs ? Or can you detect the combination of modes that causes the problem ?

Anyway thanks for reporting.

zyqhi commented 9 years ago

Thanks for your response. It is the global-linum-mode that causes the problem. When I start the vanilla Emacs, and then enable sublimity, it works well. But after enable global-linum-mode, the problem appears again. Here is the code:

(require 'linum)
(global-linum-mode t)
zk-phi commented 9 years ago

Ah, I see, both linum-mode and sublimity set window margins in after-window-configuration-change-hook and they conflict. It may need some tricky workaround to fix.