mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-16 09:51:56 +00:00
Import patch from Roman Imankulov:
"sdcv" does not set up `rl_readline_name' variable which can be extremely useful for the writing the .inputrc file. Additionally sdcv does not use readline in the "Your choice [-1 to abort]" dialog. This patch fix both these issues, readline_name is set up to "sdcv". This trick allows me to add into the .inputrc $if sdcv "\e\e": "-1\n" $endif and type double-escape in the "Your choice" dialog instead of pretty annoying "-1".
This commit is contained in:
@@ -47,9 +47,11 @@ public:
|
||||
#else
|
||||
|
||||
class real_readline : public read_line {
|
||||
|
||||
public:
|
||||
real_readline()
|
||||
{
|
||||
rl_readline_name = "sdcv";
|
||||
using_history();
|
||||
string histname=(string(g_get_home_dir())+G_DIR_SEPARATOR+".sdcv_history");
|
||||
read_history(histname.c_str());;
|
||||
@@ -66,7 +68,7 @@ public:
|
||||
}
|
||||
bool read(const string &banner, string& line)
|
||||
{
|
||||
char *phrase=NULL;
|
||||
char *phrase=NULL;
|
||||
phrase=readline(banner.c_str());
|
||||
if (phrase) {
|
||||
line=phrase;
|
||||
|
||||
Reference in New Issue
Block a user