meh
This commit is contained in:
parent
7bd8ab5f10
commit
8e53682e91
@ -417,7 +417,7 @@ global_input(const int c){
|
|||||||
case '+':
|
case '+':
|
||||||
case ctrl('V'):
|
case ctrl('V'):
|
||||||
case KEY_NPAGE:
|
case KEY_NPAGE:
|
||||||
if (totallines == 0) { return(NO); } /* don't redisplay if there are no lines */
|
if (totallines == 0) { return 0; } /* don't redisplay if there are no lines */
|
||||||
/* XXX: figure out whether this comment is useful or not */
|
/* XXX: figure out whether this comment is useful or not */
|
||||||
/* NOTE: seekline() is not used to move to the next
|
/* NOTE: seekline() is not used to move to the next
|
||||||
* page because display() leaves the file pointer at
|
* page because display() leaves the file pointer at
|
||||||
@ -428,7 +428,7 @@ global_input(const int c){
|
|||||||
case ctrl('H'): /* display previous page */
|
case ctrl('H'): /* display previous page */
|
||||||
case '-':
|
case '-':
|
||||||
case KEY_PPAGE:
|
case KEY_PPAGE:
|
||||||
if (totallines == 0) { return(NO); } /* don't redisplay if there are no lines */
|
if (totallines == 0) { return 0; } /* don't redisplay if there are no lines */
|
||||||
curdispline = 0;
|
curdispline = 0;
|
||||||
/* if there are only two pages, just go to the other one */
|
/* if there are only two pages, just go to the other one */
|
||||||
if (totallines <= 2 * mdisprefs) {
|
if (totallines <= 2 * mdisprefs) {
|
||||||
@ -498,13 +498,13 @@ global_input(const int c){
|
|||||||
// return(YES);
|
// return(YES);
|
||||||
//}
|
//}
|
||||||
//clearprompt();
|
//clearprompt();
|
||||||
return(NO);
|
return 0;
|
||||||
case '|': /* pipe the lines to a shell command */
|
case '|': /* pipe the lines to a shell command */
|
||||||
case '^':
|
case '^':
|
||||||
break; // XXX fix
|
break; // XXX fix
|
||||||
if (totallines == 0) {
|
if (totallines == 0) {
|
||||||
postmsg("There are no lines to pipe to a shell command");
|
postmsg("There are no lines to pipe to a shell command");
|
||||||
return(NO);
|
return 0;
|
||||||
}
|
}
|
||||||
/* get the shell command */
|
/* get the shell command */
|
||||||
move(PRLINE, 0);
|
move(PRLINE, 0);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
#include <ncurses.h>
|
||||||
|
|
||||||
extern int LINES; // XXX
|
extern int LINES; // XXX
|
||||||
|
|
||||||
@ -127,7 +128,10 @@ void rlinit(){
|
|||||||
rl_redisplay_function = redisplay_function;
|
rl_redisplay_function = redisplay_function;
|
||||||
rl_callback_handler_install("", callback_handler);
|
rl_callback_handler_install("", callback_handler);
|
||||||
|
|
||||||
rl_bind_key(EOF, interpret_break);
|
rl_bind_key(7, rl_rubout); // XXX: 7 is backspace for some reason (on my system anyways?)
|
||||||
|
rl_bind_key(KEY_BACKSPACE, rl_rubout);
|
||||||
|
|
||||||
|
rl_bind_key(EOF, exit);
|
||||||
rl_bind_key(ctrl('D'), interpret_break); //XXX: why the fuck does it not work if its the first char?
|
rl_bind_key(ctrl('D'), interpret_break); //XXX: why the fuck does it not work if its the first char?
|
||||||
rl_bind_key(ctrl('Z'), ctrl_z);
|
rl_bind_key(ctrl('Z'), ctrl_z);
|
||||||
rl_bind_key(ctrl('Z'), toggle_caseless);
|
rl_bind_key(ctrl('Z'), toggle_caseless);
|
||||||
|
Loading…
Reference in New Issue
Block a user