unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9092: movement cursor in speedbar
@ 2011-07-15 15:23 Juanma Barranquero
  2020-12-08 14:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2011-07-15 15:23 UTC (permalink / raw)
  To: 9092

emacs -Q -f speedbar

The cursor is at the bottom of the speedbar window.

<up>    ; the cursor moves over the icon in the previous line
<up>
...
<up>    ; the cursor moves over the icons normally
<right> <left>  ; the cursor is again over the icon
<down>   ; now the cursor moves to the space next to the icon.

and from that moment on, even if you move over the icon, the cursor
moves back outside it.

According to Eli, line-move-visual tells vertical-motion which column
the cursor should move to, and that does not work too well with stuff
that isn't text, like an image or a stretch glyph (like the one for
`(space :align-to NN)') display property.

    Juanma





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

* bug#9092: movement cursor in speedbar
  2011-07-15 15:23 bug#9092: movement cursor in speedbar Juanma Barranquero
@ 2020-12-08 14:46 ` Lars Ingebrigtsen
  2020-12-15 17:36   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-08 14:46 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 9092

Juanma Barranquero <lekktu@gmail.com> writes:

> emacs -Q -f speedbar
>
> The cursor is at the bottom of the speedbar window.
>
> <up>    ; the cursor moves over the icon in the previous line
> <up>
> ...
> <up>    ; the cursor moves over the icons normally
> <right> <left>  ; the cursor is again over the icon
> <down>   ; now the cursor moves to the space next to the icon.
>
> and from that moment on, even if you move over the icon, the cursor
> moves back outside it.

This behaviour is still present in Emacs 28.

> According to Eli, line-move-visual tells vertical-motion which column
> the cursor should move to, and that does not work too well with stuff
> that isn't text, like an image or a stretch glyph (like the one for
> `(space :align-to NN)') display property.

Speedbar seems to have some invisible characters at the start, and then
an image, and I think that's what's confusing Emacs here.  If it has
been just an image, Emacs usually handles that fine.

Here's a simpler recipe to reproduce:

(dotimes (i 5)
  (insert (propertize "a" 'invisible t)
	  (propertize "c" 'display
		      (find-image '((:type xpm :file "search.xpm"))))
	  (format " foo %s\n" i)))

If we don't have the invisible text before the image, then motion
commands work as expected.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#9092: movement cursor in speedbar
  2020-12-08 14:46 ` Lars Ingebrigtsen
@ 2020-12-15 17:36   ` Eli Zaretskii
  2020-12-17 11:21     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2020-12-15 17:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: lekktu, 9092

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 08 Dec 2020 15:46:21 +0100
> Cc: 9092@debbugs.gnu.org
> 
> (dotimes (i 5)
>   (insert (propertize "a" 'invisible t)
> 	  (propertize "c" 'display
> 		      (find-image '((:type xpm :file "search.xpm"))))
> 	  (format " foo %s\n" i)))
> 
> If we don't have the invisible text before the image, then motion
> commands work as expected.

Yes, the invisible text immediately before the image was the trigger
here.

Should be fixed now on the master branch.





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

* bug#9092: movement cursor in speedbar
  2020-12-15 17:36   ` Eli Zaretskii
@ 2020-12-17 11:21     ` Lars Ingebrigtsen
  2020-12-17 14:37       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-17 11:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: lekktu, 9092

Eli Zaretskii <eliz@gnu.org> writes:

> Yes, the invisible text immediately before the image was the trigger
> here.
>
> Should be fixed now on the master branch.

Yup; works great, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#9092: movement cursor in speedbar
  2020-12-17 11:21     ` Lars Ingebrigtsen
@ 2020-12-17 14:37       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2020-12-17 14:37 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: lekktu, 9092

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: lekktu@gmail.com,  9092@debbugs.gnu.org
> Date: Thu, 17 Dec 2020 12:21:07 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Yes, the invisible text immediately before the image was the trigger
> > here.
> >
> > Should be fixed now on the master branch.
> 
> Yup; works great, so I'm closing this bug report.

FTR, this also fixed posn-at-point and pos-visible-in-window-p, which
were reporting incorrect information when cursor was placed on the
image that follows invisible text at BOL.





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

end of thread, other threads:[~2020-12-17 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15 15:23 bug#9092: movement cursor in speedbar Juanma Barranquero
2020-12-08 14:46 ` Lars Ingebrigtsen
2020-12-15 17:36   ` Eli Zaretskii
2020-12-17 11:21     ` Lars Ingebrigtsen
2020-12-17 14:37       ` Eli Zaretskii

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).