bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51702: 29.0.50; [PATCH] Fix xwidget buffer name being stuck on somet


From: Eli Zaretskii
Subject: bug#51702: 29.0.50; [PATCH] Fix xwidget buffer name being stuck on something nonsensical
Date: Tue, 09 Nov 2021 14:50:19 +0200

> Date: Tue, 09 Nov 2021 14:39:32 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> >From a943d9b995d701d4ae7029f6f6f3ae91ceb3a29b Mon Sep 17 00:00:00 2001
> From: Po Lu <luangruo@yahoo.com>
> Date: Tue, 9 Nov 2021 14:37:47 +0800
> Subject: [PATCH] Always set xwidget title if the event was "load-finished"
> 
> * lisp/xwidget.el (xwidget-webkit-callback): Always set title upon
> load completion.  This prevents loading pages such as "about:blank"
> from not setting the buffer name.
> ---
>  lisp/xwidget.el | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/lisp/xwidget.el b/lisp/xwidget.el
> index fc37798322..905327083b 100644
> --- a/lisp/xwidget.el
> +++ b/lisp/xwidget.el
> @@ -360,9 +360,11 @@ xwidget-webkit-callback
>      (cond ((eq xwidget-event-type 'load-changed)
>             (let ((title (xwidget-webkit-title xwidget)))
>               ;; This funciton will be called multi times, so only
> -             ;; change buffer name when get a valid title. this can
> -             ;; limit buffer-name flicker in mode-line.
> -             (when (> (length title) 0)
> +             ;; change buffer name when the load actually completes
> +             ;; this can limit buffer-name flicker in mode-line.
> +             (when (or (string-equal (nth 3 last-input-event)
> +                                     "load-finished")
> +                       (> (length title) 0))

You've lost the period in the comment there.  And the sentence after
that should be capitalized, of course.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]