unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alexandre Garreau <galex-713@galex-713.eu>
Cc: emacs-devel@gnu.org
Subject: Re: Highlighting cursor for char before
Date: Wed, 27 Oct 2021 22:04:49 +0300	[thread overview]
Message-ID: <837ddyuw4u.fsf@gnu.org> (raw)
In-Reply-To: <3758334.UuyoW76GZr@galex-713.eu> (message from Alexandre Garreau on Wed, 27 Oct 2021 20:49:47 +0200)

> From: Alexandre Garreau <galex-713@galex-713.eu>
> Cc: emacs-devel@gnu.org
> Date: Wed, 27 Oct 2021 20:49:47 +0200
> 
> To me, in LTR, currently with the current behavior, in both insert and 
> ovrwt mode, that block is underlining “the place where will appear the 
> character I type” (first assertion), and that’s its meaning.  It also 
> underlines the character that will be deleted if I press Suppr or C-d 
> (second assertion), but since most of the time I use DEL, that’s 
> irrelevant, because the character that would be deleted if I press DEL is 
> not the one underlined.
> 
> In RTL, currently, the second assertion holds, but the first doesn’t… 

Only if you type RTL text inside a paragraph whose base direction is
left-to-right.  If you type RTL text in a paragraph with right-to-left
base direction, both assertions hold.

> > It is complex, yes.  That's what I tried to explain.
> 
> Isn’t it just a matter of taking the current behavior and reversing the 
> way the block is drawed compared to the cursor position (the position 
> between two chars that we would see if the cursor was just a line)?

I don't think I understand what you mean by "reversing" here.  The
function that decides where to draw the cursor is set-cursor_from_row;
please study it before talking about these details, because otherwise
we won't have a common understanding on which to build any meaningful
discussion.

> and still: is that in xdisp.c?

Most of it, yes.

> > And I don't think it makes sense to display the cursor on the
> > character before point, because it will be terrible in bidirectional
> > context.
> 
> Why so?

Because no other program does that.



      reply	other threads:[~2021-10-27 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 12:36 Highlighting cursor for char before Alexandre Garreau
2021-10-18 13:26 ` Eli Zaretskii
2021-10-27 14:44   ` Alexandre Garreau
2021-10-27 15:59     ` Eli Zaretskii
2021-10-27 18:49       ` Alexandre Garreau
2021-10-27 19:04         ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837ddyuw4u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=galex-713@galex-713.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).