zk-phi / sublimity

Smooth-scrolling and minimap like sublime editor
492 stars 27 forks source link

Cannot disable `sublimity-auto-hscroll-mode` #33

Open paldepind opened 8 years ago

paldepind commented 8 years ago

When sublimity-auto-hscroll-mode is active I cannot scroll the buffer with the mouse. Thus I'd like to disable it. I've tried setting sublimity-auto-hscroll-mode but it seems to have no effect.

zk-phi commented 8 years ago

how about setting auto-hscroll-mode ?

(setq sublimity-auto-hscroll-mode nil
      auto-hscroll-mode t)
paldepind commented 8 years ago

It has no effect either :cry:

zk-phi commented 8 years ago

hmm... can you tell me which command is invoked on hscroll? (<f1> k then scroll right or left)

paldepind commented 8 years ago

Oh. I think I might have misunderstood what hscroll-mode is.

I use sublimity for it's great smooth scrolling. But when the point is at the end of the buffer it is vertically centred in the frame and I cannot scroll with the mousewheel. That is the behaviour I am trying to disable.

My current configuration looks like this.

(use-package sublimity
  :init
  (require 'sublimity-scroll)
  :config
  (sublimity-mode 1))
zk-phi commented 8 years ago

I got it. sublimity internally uses recenter to determine the amount of scroll without redisplaying, thus it may be technically difficult...

paldepind commented 8 years ago

Oh. That is unfortunate. Especially with something like IRC in Emacs it causes quite a bit of trouble.

Why does it only happen when point is a the very end of the buffer?

zk-phi commented 8 years ago

recenter is always called whenever the cursor goes outside the visible portion of the window, and the cursor is vertically centered. so it's not special for the end of the buffer. how does it cause a trouble ? It's possible to disable recenter when the cursor is at the end of the buffer.

paldepind commented 8 years ago

There's definitely something special happening at the end of the buffer. When point is at the end of the buffer I can't scroll and C-l recenter-top-bottom doesn't work either. If point is just one character away from the end of the buffer then everything is fine.

It causes trouble in Circe because it moves point to the bottom of the screen but Sublimity moves point to the middle of the screen. So when using it there is a lot of jumping around.