Emacs — calculating new window-start/end without redisplay

前端 未结 3 617
不思量自难忘°
不思量自难忘° 2021-01-06 02:55

Is it possible to calculate a new window-start/end without a redisplay occurring? If so, then an example would be greatly appreciated. If not, th

3条回答
  •  孤独总比滥情好
    2021-01-06 03:33

    I think you want to use jit-lock-register instead of post-command-hook. This way, the redisplay code will call you back once it has decided of a window-start and you'll be able to add the overlays you want before the buffer's content is displayed.

提交回复
热议问题