[Top][All Lists]

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

[Bug-readline] Reverse Scrolling in BASH

From: Andrew Dixon
Subject: [Bug-readline] Reverse Scrolling in BASH
Date: Tue, 28 Feb 2012 11:48:59 -0800

Hi all,

I've been thinking lately that it would be really cool if bash scrolled up instead of down. When I'm working on my laptop, I want to be looking at the top of the screen instead of the bottom. So, I'm trying to hack this feature into bash and I was wondering if anyone can point me in the right direction.

I think(tm) the right place to do this is in lib/readline/display.c. Specifically the rl_redisplay() function (see below). If I understand this correctly, we've created rl_outstream which is the line that we want to print and fflush will actually print it to the terminal. So, I want to modify rl_outstream so that the prompt is on top instead of on the bottom. Does that sound right? Any hints tips or tricks would be greatly appreciated.


492 /* Basic redisplay algorithm. */
493 void
494 rl_redisplay () 
495 {
1229        /* ADD - figure out what fflush does. I think this is the final step before 
1230          *       we output to the screen
1231          */
1232   fflush (rl_outstream);
1251         /* ADD - Seems like this is important. Can we set the prompt to the upper left 
1252          *       corner before this line?
1253          */
1255   _rl_release_sigint ();
1256 }

reply via email to

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