fixed text changing bugs

This commit is contained in:
anon 2023-09-02 23:09:16 +02:00
parent ecb35f63ce
commit fd0aa065a2
3 changed files with 8 additions and 4 deletions

View File

@ -268,6 +268,7 @@ void force_window(){
break;
case INPUT_CHANGE_TO:
case INPUT_APPEND:
case INPUT_READ:
current_window = &winput;
break;
}

View File

@ -393,8 +393,6 @@ int change_input(const int c) {
}
}
input_mode = INPUT_NORMAL;
return 0;
}
@ -406,7 +404,8 @@ int changestring(const char *from, const char *to, const bool *const change,
char msg[MSGLEN + 1]; /* message */
FILE *script; /* shell script file */
/* Return early */
// Return early
bool anymarked = false; /* any line marked */
for(int i = 0; i < change_len; i++) {
if(change[i]) {

View File

@ -80,7 +80,10 @@ static void redisplay_function() {
}
static void callback_handler(char *line) {
if(!line) { return; } // XXX; should behave differently with different modes
if(!line) {
input_mode = INPUT_NORMAL;
return;
}
add_history(line);
@ -127,6 +130,7 @@ static void callback_handler(char *line) {
case CHANGE:
if(totallines == 0){ return; }
input_mode = INPUT_CHANGE_TO;
force_window();
break;
case DEFINITION:
case FILENAME: