bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] Resize bug in noecho mode


From: Balazs Kezes
Subject: [Bug-readline] Resize bug in noecho mode
Date: Tue, 20 Jul 2010 22:15:21 +0200

Version: 6.1

Machine: I have tested this on Core, Core2

OS: Linux 2.6.34 (ArchLinux)

Configuration: ./configure CFLAGS=-g

Description: Readline doesn't update its internal data about screen size when
terminal is in noecho mode.

Recipe:

#include <stdio.h>
#include <stdlib.h>
#include <ncurses.h>
#include <readline/readline.h>

int main(void)
{
        char * line;

        initscr();
        noecho();
        line = readline("> "); free(line);
        echo();
        endwin();

        line = readline("> "); free(line);
        return 0;
}

Start the application, make the terminal bigger (make sure it has more
columns). Press Enter. Now start typing. You will notice that readline doesn't
fully go till the right side of the terminal, but only till the middle.

Possible bugfix:

Whenever we enable echoing (_rl_echoing_p is set to 1) we also should update
screen size. _rl_echoing_p is set in multiple places so I think this should be
refactored into a function.

--
Balazs



reply via email to

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