emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distinguishing: Temporary v. Semi-Permanent -- Horizontal Scrolling


From: Keith David Bershatsky
Subject: Distinguishing: Temporary v. Semi-Permanent -- Horizontal Scrolling
Date: Sat, 23 Jun 2018 20:49:26 -0700

I am working on feature requests 17684 (crosshairs) and 22873 (multiple fake 
cursors).

Temporary horizontal scrolling is achieved by interactively calling:  
(scroll-left 1)

Semi-permanent horizontal scrolling is achieved by typing:  C-u C-x <

To determine whether _only_ the current line is _temporarily_ horizontally 
scrolled, I have been using:

  bool hscl = (!it->w->suspend_auto_hscroll
               && EQ (Fbuffer_local_value (Qauto_hscroll_mode, buf), 
Qcurrent_line)
               && it->w->hscroll > 0);

I am now moving on to deal with a situation where horizontal scrolling is 
semi-permanent.  In this situation (C-u C-x <), hscl is true.  So that test is 
insufficient here.

What test, please, would be appropriate to determine whether semi-permanent 
(c-u C-x <) is in effect?

And, is it correct to assume that the current line will never be horizontally 
scrolled differently when semi-permanent (C-u X-x <) is in effect?

Thanks,

Keith



reply via email to

[Prev in Thread] Current Thread [Next in Thread]