unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23993: 25.0.91; cursor vanishes at prompt
@ 2016-07-15 15:11 David Reitter
  2016-07-15 16:11 ` Clément Pit--Claudel
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Reitter @ 2016-07-15 15:11 UTC (permalink / raw)
  To: 23993

The following configuration makes the cursor vanish when at the end of a *shell* buffer.

Emacs -Q
(shell)
;; evaluate this somewhere:
(set-face-attribute 'comint-highlight-prompt nil :height 100)

Select the window with the *shell* buffer, maybe press Enter to add a line with a prompt.

In practice, this occurs in a more complex configuration, too - in other comint buffers, and with various font height configurations, or with fonts enlarged via face-remapping-alist.   This is happens all the time in the Aquamacs configuration.

I think it’s new in -25, but I haven’t checked.






In GNU Emacs 25.0.91.1 (x86_64-apple-darwin15.3.0, NS appkit-1404.34 Version 10.11.3 (Build 15D21))
 of 2016-02-29 built on momo.local
Repository revision: 52f64cc2e74ab83752c8f2d37ef0fc6df5ef8b30
Windowing system distributor 'Apple', version 10.3.1404
Configured features:
RSVG DBUS NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
#<buffer *shell*>
nil
delete-backward-char: Text is read-only
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec epg epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase
cl-lib mail-prsvr mail-utils shell pcomplete comint ansi-color ring
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind kqueue cocoa
ns multi-tty make-network-process emacs)

Memory information:
((conses 16 200111 8791)
 (symbols 48 19905 0)
 (miscs 40 67 221)
 (strings 32 16966 5230)
 (string-bytes 1 496093)
 (vectors 16 33469)
 (vector-slots 8 654559 5173)
 (floats 8 164 119)
 (intervals 56 231 0)
 (buffers 976 13))






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

* bug#23993: 25.0.91; cursor vanishes at prompt
  2016-07-15 15:11 bug#23993: 25.0.91; cursor vanishes at prompt David Reitter
@ 2016-07-15 16:11 ` Clément Pit--Claudel
  2016-07-15 19:01 ` Alan Third
  2016-07-15 20:15 ` bug#23993: [PATCH] Fix cursor display (bug#23993) Alan Third
  2 siblings, 0 replies; 7+ messages in thread
From: Clément Pit--Claudel @ 2016-07-15 16:11 UTC (permalink / raw)
  To: David Reitter, 23993


[-- Attachment #1.1: Type: text/plain, Size: 3492 bytes --]

I can't reproduce this in master.

On 2016-07-15 17:11, David Reitter wrote:
> The following configuration makes the cursor vanish when at the end of a *shell* buffer.
> 
> Emacs -Q
> (shell)
> ;; evaluate this somewhere:
> (set-face-attribute 'comint-highlight-prompt nil :height 100)
> 
> Select the window with the *shell* buffer, maybe press Enter to add a line with a prompt.
> 
> In practice, this occurs in a more complex configuration, too - in other comint buffers, and with various font height configurations, or with fonts enlarged via face-remapping-alist.   This is happens all the time in the Aquamacs configuration.
> 
> I think it’s new in -25, but I haven’t checked.
> 
> 
> 
> 
> 
> 
> In GNU Emacs 25.0.91.1 (x86_64-apple-darwin15.3.0, NS appkit-1404.34 Version 10.11.3 (Build 15D21))
>  of 2016-02-29 built on momo.local
> Repository revision: 52f64cc2e74ab83752c8f2d37ef0fc6df5ef8b30
> Windowing system distributor 'Apple', version 10.3.1404
> Configured features:
> RSVG DBUS NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
> 
> Important settings:
>   value of $LANG: en_US.UTF-8
>   locale-coding-system: utf-8-unix
> 
> Major mode: Lisp Interaction
> 
> Minor modes in effect:
>   shell-dirtrack-mode: t
>   tooltip-mode: t
>   global-eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
> 
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> Mark set
> #<buffer *shell*>
> nil
> delete-backward-char: Text is read-only
> Making completion list...
> 
> Load-path shadows:
> None found.
> 
> Features:
> (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
> mml-sec epg epg-config gnus-util mm-decode mm-bodies mm-encode
> mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
> rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase
> cl-lib mail-prsvr mail-utils shell pcomplete comint ansi-color ring
> time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
> lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd
> fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
> lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
> scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame
> cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
> tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
> slovak czech european ethiopic indian cyrillic chinese charscript
> case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
> cl-preloaded nadvice loaddefs button faces cus-face macroexp files
> text-properties overlay sha1 md5 base64 format env code-pages mule
> custom widget hashtable-print-readable backquote dbusbind kqueue cocoa
> ns multi-tty make-network-process emacs)
> 
> Memory information:
> ((conses 16 200111 8791)
>  (symbols 48 19905 0)
>  (miscs 40 67 221)
>  (strings 32 16966 5230)
>  (string-bytes 1 496093)
>  (vectors 16 33469)
>  (vector-slots 8 654559 5173)
>  (floats 8 164 119)
>  (intervals 56 231 0)
>  (buffers 976 13))
> 
> 
> 
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* bug#23993: 25.0.91; cursor vanishes at prompt
  2016-07-15 15:11 bug#23993: 25.0.91; cursor vanishes at prompt David Reitter
  2016-07-15 16:11 ` Clément Pit--Claudel
@ 2016-07-15 19:01 ` Alan Third
  2016-07-15 20:15 ` bug#23993: [PATCH] Fix cursor display (bug#23993) Alan Third
  2 siblings, 0 replies; 7+ messages in thread
From: Alan Third @ 2016-07-15 19:01 UTC (permalink / raw)
  To: David Reitter; +Cc: 23993

On Sat, Jul 16, 2016 at 12:11:11AM +0900, David Reitter wrote:
> The following configuration makes the cursor vanish when at the end of a *shell* buffer.
> 
> Emacs -Q
> (shell)
> ;; evaluate this somewhere:
> (set-face-attribute 'comint-highlight-prompt nil :height 100)
> 
> Select the window with the *shell* buffer, maybe press Enter to add a line with a prompt.
> 
> In practice, this occurs in a more complex configuration, too - in other comint buffers, and with various font height configurations, or with fonts enlarged via face-remapping-alist.   This is happens all the time in the Aquamacs configuration.
> 
> I think it’s new in -25, but I haven’t checked.

I can confirm I can see it in the master branch, and Emacs 24.5 does
display the cursor.

I only see this in the NS port.

It looks like the cursor isn't drawn when the line height is less than
the cursor height, or something.
-- 
Alan Third





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

* bug#23993: [PATCH] Fix cursor display (bug#23993)
  2016-07-15 15:11 bug#23993: 25.0.91; cursor vanishes at prompt David Reitter
  2016-07-15 16:11 ` Clément Pit--Claudel
  2016-07-15 19:01 ` Alan Third
@ 2016-07-15 20:15 ` Alan Third
  2016-07-16  2:50   ` David Reitter
                     ` (2 more replies)
  2 siblings, 3 replies; 7+ messages in thread
From: Alan Third @ 2016-07-15 20:15 UTC (permalink / raw)
  To: David Reitter; +Cc: 23993

* src/xdisp.c (get_phys_cursor_geometry): Fix invalid C operator.
---
 src/xdisp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 14d6f8f..efd5f54 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2237,7 +2237,7 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row,
   ascent = row->ascent;
   if (row->ascent < glyph->ascent)
     {
-      y =- glyph->ascent - row->ascent;
+      y -= glyph->ascent - row->ascent;
       ascent = glyph->ascent;
     }
 
-- 
Eli, I just wanted to run this by you because you wrote this code and
I'm not sure if that =- is just a typo or it's something I've never
seen before. My guess is it's a typo and gcc happily treats it as -=,
but clang handles it more like 'y = y - a - b' resulting in odd
behaviour on OS X.

-- 
Alan Third





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

* bug#23993: [PATCH] Fix cursor display (bug#23993)
  2016-07-15 20:15 ` bug#23993: [PATCH] Fix cursor display (bug#23993) Alan Third
@ 2016-07-16  2:50   ` David Reitter
  2016-07-16  6:54   ` Eli Zaretskii
  2016-07-16  9:13   ` Clément Pit--Claudel
  2 siblings, 0 replies; 7+ messages in thread
From: David Reitter @ 2016-07-16  2:50 UTC (permalink / raw)
  To: Alan Third; +Cc: 23993

On Jul 16, 2016, at 5:15 AM, Alan Third <alan@idiocy.org> wrote:

> -      y =- glyph->ascent - row->ascent;
> +      y -= glyph->ascent - row->ascent;

Nice, well done.  Fixes the problem for me.







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

* bug#23993: [PATCH] Fix cursor display (bug#23993)
  2016-07-15 20:15 ` bug#23993: [PATCH] Fix cursor display (bug#23993) Alan Third
  2016-07-16  2:50   ` David Reitter
@ 2016-07-16  6:54   ` Eli Zaretskii
  2016-07-16  9:13   ` Clément Pit--Claudel
  2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2016-07-16  6:54 UTC (permalink / raw)
  To: Alan Third; +Cc: david.reitter, 23993

> Date: Fri, 15 Jul 2016 21:15:55 +0100
> From: Alan Third <alan@idiocy.org>
> Cc: 23993@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
> 
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -2237,7 +2237,7 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row,
>    ascent = row->ascent;
>    if (row->ascent < glyph->ascent)
>      {
> -      y =- glyph->ascent - row->ascent;
> +      y -= glyph->ascent - row->ascent;
>        ascent = glyph->ascent;
>      }
>  
> -- 
> Eli, I just wanted to run this by you because you wrote this code and
> I'm not sure if that =- is just a typo or it's something I've never
> seen before. My guess is it's a typo and gcc happily treats it as -=,
> but clang handles it more like 'y = y - a - b' resulting in odd
> behaviour on OS X.

It's a typo, thanks for catching it.





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

* bug#23993: [PATCH] Fix cursor display (bug#23993)
  2016-07-15 20:15 ` bug#23993: [PATCH] Fix cursor display (bug#23993) Alan Third
  2016-07-16  2:50   ` David Reitter
  2016-07-16  6:54   ` Eli Zaretskii
@ 2016-07-16  9:13   ` Clément Pit--Claudel
  2 siblings, 0 replies; 7+ messages in thread
From: Clément Pit--Claudel @ 2016-07-16  9:13 UTC (permalink / raw)
  To: 23993; +Cc: alan


[-- Attachment #1.1: Type: text/plain, Size: 749 bytes --]

On 2016-07-15 22:15, Alan Third wrote:
> Eli, I just wanted to run this by you because you wrote this code and
> I'm not sure if that =- is just a typo or it's something I've never
> seen before. My guess is it's a typo and gcc happily treats it as -=,
> but clang handles it more like 'y = y - a - b' resulting in odd
> behaviour on OS X.

In fact, both Clang and GCC treat it the same (as '=' followed by a unary minus):

#include <stdio.h>

int main () {
  int y = 1;
  y =- 1; // Same as y = -1;
  printf("%d\n", y); // Prints "-1"
}

Interestingly, clang warns about this:

    5   5 warning         use of unary operator that may be intended as compound assignment (-=) (c/c++-clang)

Thanks for spotting it!
Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2016-07-16  9:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-15 15:11 bug#23993: 25.0.91; cursor vanishes at prompt David Reitter
2016-07-15 16:11 ` Clément Pit--Claudel
2016-07-15 19:01 ` Alan Third
2016-07-15 20:15 ` bug#23993: [PATCH] Fix cursor display (bug#23993) Alan Third
2016-07-16  2:50   ` David Reitter
2016-07-16  6:54   ` Eli Zaretskii
2016-07-16  9:13   ` Clément Pit--Claudel

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