aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c2
-rw-r--r--editors/vi.c26
2 files changed, 14 insertions, 14 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 2f6fc174c..dcc2ca06b 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1191,7 +1191,7 @@ extern int sed_main(int argc, char **argv)
1191 if(in_place) { 1191 if(in_place) {
1192 struct stat statbuf; 1192 struct stat statbuf;
1193 int nonstdoutfd; 1193 int nonstdoutfd;
1194 1194
1195 outname=bb_xstrndup(argv[i],strlen(argv[i])+6); 1195 outname=bb_xstrndup(argv[i],strlen(argv[i])+6);
1196 strcat(outname,"XXXXXX"); 1196 strcat(outname,"XXXXXX");
1197 if(-1==(nonstdoutfd=mkstemp(outname))) 1197 if(-1==(nonstdoutfd=mkstemp(outname)))
diff --git a/editors/vi.c b/editors/vi.c
index 6689e290b..fddd0a9ea 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -1673,13 +1673,13 @@ static Byte find_range(Byte ** start, Byte ** stop, Byte c)
1673 q = dot; 1673 q = dot;
1674 } else if (strchr("wW", c)) { 1674 } else if (strchr("wW", c)) {
1675 do_cmd(c); // execute movement cmd 1675 do_cmd(c); // execute movement cmd
1676 // if we are at the next word's first char 1676 // if we are at the next word's first char
1677 // step back one char 1677 // step back one char
1678 // but check the possibilities when it is true 1678 // but check the possibilities when it is true
1679 if (dot > text && ((isspace(dot[-1]) && !isspace(dot[0])) 1679 if (dot > text && ((isspace(dot[-1]) && !isspace(dot[0]))
1680 || (ispunct(dot[-1]) && !ispunct(dot[0])) 1680 || (ispunct(dot[-1]) && !ispunct(dot[0]))
1681 || (isalnum(dot[-1]) && !isalnum(dot[0])))) 1681 || (isalnum(dot[-1]) && !isalnum(dot[0]))))
1682 dot--; // move back off of next word 1682 dot--; // move back off of next word
1683 if (dot > text && *dot == '\n') 1683 if (dot > text && *dot == '\n')
1684 dot--; // stay off NL 1684 dot--; // stay off NL
1685 q = dot; 1685 q = dot;
@@ -2405,7 +2405,7 @@ static Byte *get_input_line(Byte * prompt) // get input line- use "status line"
2405 if (c == '\n' || c == '\r' || c == 27) 2405 if (c == '\n' || c == '\r' || c == 27)
2406 break; // is this end of input 2406 break; // is this end of input
2407 if (c == erase_char || c == 8 || c == 127) { 2407 if (c == erase_char || c == 8 || c == 127) {
2408 // user wants to erase prev char 2408 // user wants to erase prev char
2409 i--; // backup to prev char 2409 i--; // backup to prev char
2410 buf[i] = '\0'; // erase the char 2410 buf[i] = '\0'; // erase the char
2411 buf[i + 1] = '\0'; // null terminate buffer 2411 buf[i + 1] = '\0'; // null terminate buffer
@@ -3754,11 +3754,11 @@ key_cmd_mode:
3754 end_cmd_q(); // stop adding to q 3754 end_cmd_q(); // stop adding to q
3755 break; 3755 break;
3756 case 't': // t- move to char prior to next x 3756 case 't': // t- move to char prior to next x
3757 last_forward_char = get_one_char(); 3757 last_forward_char = get_one_char();
3758 do_cmd(';'); 3758 do_cmd(';');
3759 if (*dot == last_forward_char) 3759 if (*dot == last_forward_char)
3760 dot_left(); 3760 dot_left();
3761 last_forward_char= 0; 3761 last_forward_char= 0;
3762 break; 3762 break;
3763 case 'w': // w- forward a word 3763 case 'w': // w- forward a word
3764 if (cmdcnt-- > 1) { 3764 if (cmdcnt-- > 1) {
@@ -4047,4 +4047,4 @@ static void crash_test()
4047 } 4047 }
4048 return; 4048 return;
4049} 4049}
4050#endif /* CONFIG_FEATURE_VI_CRASHME */ 4050#endif /* CONFIG_FEATURE_VI_CRASHME */