public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tui/31522] TUI misses highlight after run to main
Date: Tue, 02 Apr 2024 14:09:02 +0000	[thread overview]
Message-ID: <bug-31522-4717-SBbylseKdd@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31522-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31522

--- Comment #15 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b35013e29f3bcf9028aa22291f378010420322fe

commit b35013e29f3bcf9028aa22291f378010420322fe
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Apr 2 16:09:10 2024 +0200

    [gdb/tui] Fix centering and highlighting of current line

    After starting TUI like this with a hello world a.out:
    ...
    $ gdb -q a.out -ex start -ex "tui enable"
    ...
    we get:
    ...
   
ââhello.câââââââââââââââââââââââââââââââ
    â        5 {                           â
    â        6   printf ("hello\n");       â
    â        7                             â
    â        8   return 0;                 â
    â        9 }                           â
    â                                      â
   
ââââââââââââââââââââââââââââââââââââââââ
    ...

    This is a regression since commit ee1e9bbb513 ("[gdb/tui] Fix displaying
main
    after resizing"), before which we had instead:
    ...
   
ââhello.câââââââââââââââââââââââââââââââ
    â        4 main (void)                 â
    â        5 {                           â
    â  >     6 [7m  printf ("hello\n");[0m       â
    â        7                             â
    â        8   return 0;                 â
    â        9 }                           â
   
ââââââââââââââââââââââââââââââââââââââââ
    ...

    In other words, the problems are:
    - the active line (source line 6) is no longer highlighted, and
    - the active line is not vertically centered (screen line 2 out 6 instead
of
      screen line 3 out of 6).

    Fix these problems respectively by:
    - in tui_enable, instead of "tui_show_frame_info (0)" using
      'tui_show_frame_info (deprecated_safe_get_selected_frame ())", and
    - in tui_source_window_base::rerender, adding centering functionality.

    Tested on aarch64-linux.

    Co-Authored-By: Tom Tromey <tom@tromey.com>
    Approved-By: Tom Tromey <tom@tromey.com>

    PR tui/31522
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31522

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-04-02 14:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 15:57 [Bug tui/31522] New: " pedro at palves dot net
2024-03-21 16:19 ` [Bug tui/31522] " ssbssa at sourceware dot org
2024-03-21 16:19 ` tromey at sourceware dot org
2024-03-22 16:24 ` tromey at sourceware dot org
2024-03-25 23:18 ` tromey at sourceware dot org
2024-03-25 23:18 ` tromey at sourceware dot org
2024-03-26  0:26 ` tromey at sourceware dot org
2024-03-26 13:15 ` pedro at palves dot net
2024-03-27  1:10 ` tromey at sourceware dot org
2024-03-27  8:33 ` vries at gcc dot gnu.org
2024-03-27 22:35 ` tromey at sourceware dot org
2024-03-28 10:33 ` vries at gcc dot gnu.org
2024-03-28 11:07 ` pedro at palves dot net
2024-03-28 12:00 ` vries at gcc dot gnu.org
2024-03-28 14:34 ` vries at gcc dot gnu.org
2024-03-28 14:35 ` vries at gcc dot gnu.org
2024-03-28 14:50 ` vries at gcc dot gnu.org
2024-03-28 16:43 ` pedro at palves dot net
2024-03-28 22:26 ` tromey at sourceware dot org
2024-04-02 14:09 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-02 14:10 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31522-4717-SBbylseKdd@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).