emacs-devel
[Top][All Lists]
Advanced

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

mode-line size and position indicator


From: Nick Helm
Subject: mode-line size and position indicator
Date: Wed, 23 Aug 2017 15:20:27 +1200
User-agent: mu4e 0.9.18; emacs 25.2.1

Hi all,

I've been trying to improve my C skills lately, so I thought I'd take a
crack at adding a small feature to xdisp.c.

I've written a simple mode-line indicator to visually show the relative
size and position of the window view on the current buffer. It works by
adding a new %-spec construct to decode_mode_spec.

The result is akin to a vertical scroll-bar, but it appears as a
horizontal mark on the mode-line. It may be useful to terminal users or
those who prefer to run with traditional scroll-bars turned off. I've
attached a screen-grab of what it looks like on my system.

The indicator is activated by adding %N~ to mode-line-format, where N is
a positive integer that sets the desired width of the indicator in char.

I'm under no illusions that this should be included in Emacs, and
admittedly, it is a very simple feature, but I'd appreciate any
comments or suggestions to improve the code. Patch attached.

Thanks,
Nick

Attachment: xdisp.c.patch
Description: Text Data

Attachment: indicator.png
Description: PNG image


reply via email to

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