[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Console based mouse face highlighting.
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Console based mouse face highlighting. |
Date: |
Tue, 15 May 2007 06:26:30 +0300 |
> From: Nick Roberts <address@hidden>
> Date: Tue, 15 May 2007 09:11:31 +1200
> Cc: address@hidden
>
> I'm getting closer. The help string appears now appears in the mini-buffer
> when the pointer is over highlighting and I don't have to click. The correct
> text is displayed with highlighting, however, it starts where the cursor is.
> The file msdos.c says:
>
> /* IT_write_glyphs writes at cursor position,...
>
> and I guess the same is true for write_glyphs in term.c.
Yes.
> I don't quite follow what new_pos_X, new_pos_Y do, and their use
> appears to use dos calls.
They are part of the scheme that tracks the current and desired
positions of the cursor. This comment before IT_cmgoto explains that
at some length:
/* Emacs calls cursor-movement functions a lot when it updates the
display (probably a legacy of old terminals where you cannot
update a screen line without first moving the cursor there).
However, cursor movement is expensive on MSDOS (it calls a slow
BIOS function and requires 2 mode switches), while actual screen
updates access the video memory directly and don't depend on
cursor position. To avoid slowing down the redisplay, we cheat:
all functions that move the cursor only set internal variables
which record the cursor position, whereas the cursor is only
moved to its final position whenever screen update is complete.
`IT_cmgoto' is called from the keyboard reading loop and when the
frame update is complete. This means that we are ready for user
input, so we update the cursor position to show where the point is,
and also make the mouse pointer visible.
Special treatment is required when the cursor is in the echo area,
to put the cursor at the end of the text displayed there. */
You will see in the code the careful dance with current_pos_X/Y and
new_pos_X/Y both of which are used in IT_cmgoto to decide whether it
needs to invoke a system call to actually move the cursor.
> I can't find a function that does the task of GET_CURSOR and when I do
> this without it, for some reason, the highlighting appears in the
> minibuffer where the help string is!
I think curX and curY store the current location of the cursor. They
are updated in cm.c.
- [PATCH] Console based mouse face highlighting., Nick Roberts, 2007/05/12
- Re: [PATCH] Console based mouse face highlighting., Nick Roberts, 2007/05/12
- Re: [PATCH] Console based mouse face highlighting., Eli Zaretskii, 2007/05/12
- Re: [PATCH] Console based mouse face highlighting., Nick Roberts, 2007/05/12
- Re: [PATCH] Console based mouse face highlighting., Eli Zaretskii, 2007/05/12
- Re: [PATCH] Console based mouse face highlighting., Nick Roberts, 2007/05/13
- Re: [PATCH] Console based mouse face highlighting., Eli Zaretskii, 2007/05/13
- Re: [PATCH] Console based mouse face highlighting., Nick Roberts, 2007/05/14
- Re: [PATCH] Console based mouse face highlighting.,
Eli Zaretskii <=
- Re: [PATCH] Console based mouse face highlighting., Nick Roberts, 2007/05/15
- Re: [PATCH] Console based mouse face highlighting., Eli Zaretskii, 2007/05/15
- Re: [PATCH] Console based mouse face highlighting., David Kastrup, 2007/05/15
- Re: [PATCH] Console based mouse face highlighting., Eli Zaretskii, 2007/05/15
- Re: [PATCH/Now RFA] Console based mouse face highlighting., Nick Roberts, 2007/05/15
- Re: [PATCH/Now RFA] Console based mouse face highlighting., Eli Zaretskii, 2007/05/15
- Re: [PATCH/Now RFA] Console based mouse face highlighting., Nick Roberts, 2007/05/16
- Re: [RFA] Console based mouse face highlighting., Nick Roberts, 2007/05/16
- Re: [RFA] Console based mouse face highlighting., Eli Zaretskii, 2007/05/16
- Re: [RFA] Console based mouse face highlighting., Nick Roberts, 2007/05/16