[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] long prompts do not show vi search prefix
From: |
Dylan Cali |
Subject: |
[PATCH] long prompts do not show vi search prefix |
Date: |
Sat, 23 Aug 2014 02:49:15 -0500 |
Hello,
For long prompts (127 chars or longer), vi search mode does not
display the [/?] prompt prefix.
I've included a small program below demonstrating the issue, and a
very small patch fixing it.
#include <stdio.h>
#include <readline/readline.h>
int main(void)
{
rl_variable_bind("editing-mode", "vi");
//char prompt[126]; /* displays search prefix */
char prompt[127]; /* does not */
int i;
for ( i = 0; i < sizeof(prompt)-1; i++ ) {
prompt[i] = 'x';
}
prompt[sizeof(prompt)-1] = '\0';
while (1) {
char *line = readline(prompt);
add_history(line);
}
}
Thank you!
fix-long-prompt-vi-search.patch
Description: Text Data
- [PATCH] long prompts do not show vi search prefix,
Dylan Cali <=