tags 27647 + patch quit Alex writes: > Alex writes: > >> I coincidentally stumbled across an easy recipe for this bug (or at >> least a similar bug): >> >> M-: (setq display-line-numbers t) >> M-: (setq mouse-drag-and-drop-region t) >> >> Then select a region, click on it (mouse-1), and drag the mouse. The >> line numbers will disappear until you release the mouse. >> >> Hopefully you can reproduce this on your end this time, Eli. To be >> clear, this is with a GTK build. > > Sorry, I should have also mentioned that this is indeed only the case > when x-gtk-use-system-tooltips is non-nil. Aha, the problem is this condition in should_produce_line_number: static bool should_produce_line_number (struct it *it) { ... /* Don't display line number in tooltip frames. */ if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame)) return false; Which sounds like it would be correct, except that the meaning of tip_frame is different for GTK tooltips, as explained in x_hide_tip: static Lisp_Object x_hide_tip (bool delete) { ... #ifdef USE_GTK { /* When using system tooltip, tip_frame is the Emacs frame on which the tip is shown. */ struct frame *f = XFRAME (tip_frame); Implemented in Fx_show_tip: DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, ... f = decode_window_system_frame (frame); ... #ifdef USE_GTK if (x_gtk_use_system_tooltips) { ... /* This is used in Fx_hide_tip. */ XSETFRAME (tip_frame, f); Leading to the following patch: