bug-ncurses
[Top][All Lists]
Advanced

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

Re: misplaced cursor when a double-width character is near the lower-rig


From: Johannes Altmanninger
Subject: Re: misplaced cursor when a double-width character is near the lower-right corner
Date: Sun, 14 Feb 2021 16:18:13 +0100

Sorry I forgot to CC the list. I wonder why GNU mailman doesn't do that by
default when I click "reply via email to"

Anyway here's my original message:

On Sun, Feb 14, 2021 at 03:27:18PM +0100, Johannes Altmanninger wrote:
> I believe the fix caused a regression, which was discovered in
> https://github.com/jonas/tig/issues/1083
> Reverting patch 20210130 fixes it.
> 
> Below is a minimal reproducer. The characters should fit in two lines but
> they are overflowing.
>
> I didn't manage to reproduce the motivating issue of this thread yet.
> 
> #include <curses.h>
> #include <signal.h>
> #include <stdlib.h>
> #include <assert.h>
> #include <locale.h>
> 
> static void finish(int sig);
> 
> int
> main(int argc, char *argv[])
> {
>     char *locale = setlocale(LC_ALL, ""); /* needs a valid Unicode locale */
>     assert(locale);
> 
>     (void) signal(SIGINT, finish);      /* arrange interrupts to terminate */
>     (void) initscr();      /* initialize the curses library */
>  
>     wresize(stdscr, 10, 4); /* four columns */
>     addstr("12🌏1234"); /* should fill two lines, no more */
>     getch();
>     finish(0);               /* we're done */
> }
> 
> static void finish(int sig)
> {
>     endwin();
>     exit(0);
> }



reply via email to

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