unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17303: On tty or -nw, (window-body-width) is one column too big.
@ 2014-04-20 17:03 Alan Mackenzie
  2014-04-20 19:35 ` Eli Zaretskii
       [not found] ` <handler.17303.B.13980136924874.ack@debbugs.gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Alan Mackenzie @ 2014-04-20 17:03 UTC (permalink / raw)
  To: 17303

Hi, Emacs.

I'm doing something at the moment involving scrolling of windows, and I
need to know at what "visual" column point is in.  So, naturally, I do

    (% (current-column) (window-body-width))

.  At the start of the first continuation line, this formula (correctly)
returns 0 on a GUI, but (e.g.) 79 on a tty or in emacs -nw.

This is caused by emacs counting the "\" character in the right margin as
part of the body-width.  This seems like a bad idea.  I think it's also a
bug.

So, is there a better method of determining the "visual" column point is
in?

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-21 16:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-20 17:03 bug#17303: On tty or -nw, (window-body-width) is one column too big Alan Mackenzie
2014-04-20 19:35 ` Eli Zaretskii
2014-04-20 20:05   ` Eli Zaretskii
2014-04-20 20:39   ` Alan Mackenzie
2014-04-21  6:56     ` Eli Zaretskii
2014-04-21 15:43       ` Alan Mackenzie
2014-04-21 16:07         ` Eli Zaretskii
     [not found] ` <handler.17303.B.13980136924874.ack@debbugs.gnu.org>
2014-04-21 15:29   ` bug#17303: Acknowledgement (On tty or -nw, (window-body-width) is one column too big.) Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).