Browse Source

fixed text changing bugs

dev
anon 9 months ago
parent
commit
fd0aa065a2
3 changed files with 8 additions and 4 deletions
  1. +1
    -0
      src/display.c
  2. +2
    -3
      src/input.c
  3. +5
    -1
      src/readline.c

+ 1
- 0
src/display.c View File

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


+ 2
- 3
src/input.c 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]) {


+ 5
- 1
src/readline.c 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:


Loading…
Cancel
Save