diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-12 10:00:47 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-12 10:00:47 +0200 |
| commit | 3939baaac101cea08c711638dfd537f4a039d0ae (patch) | |
| tree | 93b2a73faae588cbe4f2fdda38e20c99ce94d71e | |
| parent | f58a3d82fca1a3fb44d43f2ffba68b4445947c02 (diff) | |
| parent | 4b4529f3cb885ad6427b0c5173c4054b844c6202 (diff) | |
| download | vis-3939baaac101cea08c711638dfd537f4a039d0ae.tar.gz vis-3939baaac101cea08c711638dfd537f4a039d0ae.tar.xz | |
Merge branch 'fixups' of https://github.com/tycho/vis
| -rw-r--r-- | sam.c | 4 | ||||
| -rw-r--r-- | text-motions.c | 10 | ||||
| -rw-r--r-- | text-motions.h | 2 | ||||
| -rw-r--r-- | text-objects.c | 4 |
4 files changed, 10 insertions, 10 deletions
@@ -1080,13 +1080,13 @@ static bool cmd_filter(Vis *vis, Win *win, Command *cmd, const char *argv[], Cur /* The general idea is the following: * * 1) take a snapshot - * 2) write [range.start, range.end] to exteneral command + * 2) write [range.start, range.end] to external command * 3) read the output of the external command and insert it after the range * 4) depending on the exit status of the external command * - on success: delete original range * - on failure: revert to previous snapshot * - * 2) and 3) happend in small junks + * 2) and 3) happen in small chunks */ text_snapshot(txt); diff --git a/text-motions.c b/text-motions.c index 18e727f..0ad8e81 100644 --- a/text-motions.c +++ b/text-motions.c @@ -11,7 +11,7 @@ #define boundary(c) (isboundary((unsigned char)c)) // TODO: specify this per file type? -int is_word_boundry(int c) { +int is_word_boundary(int c) { return ISASCII(c) && !(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '_'); @@ -405,19 +405,19 @@ size_t text_longword_start_prev(Text *txt, size_t pos) { } size_t text_word_end_next(Text *txt, size_t pos) { - return text_customword_end_next(txt, pos, is_word_boundry); + return text_customword_end_next(txt, pos, is_word_boundary); } size_t text_word_end_prev(Text *txt, size_t pos) { - return text_customword_end_prev(txt, pos, is_word_boundry); + return text_customword_end_prev(txt, pos, is_word_boundary); } size_t text_word_start_next(Text *txt, size_t pos) { - return text_customword_start_next(txt, pos, is_word_boundry); + return text_customword_start_next(txt, pos, is_word_boundary); } size_t text_word_start_prev(Text *txt, size_t pos) { - return text_customword_start_prev(txt, pos, is_word_boundry); + return text_customword_start_prev(txt, pos, is_word_boundary); } size_t text_sentence_next(Text *txt, size_t pos) { diff --git a/text-motions.h b/text-motions.h index dfe3acc..e601073 100644 --- a/text-motions.h +++ b/text-motions.h @@ -123,6 +123,6 @@ size_t text_search_forward(Text *txt, size_t pos, Regex *regex); size_t text_search_backward(Text *txt, size_t pos, Regex *regex); /* is c a special symbol delimiting a word? */ -int is_word_boundry(int c); +int is_word_boundary(int c); #endif diff --git a/text-objects.c b/text-objects.c index 82fa36f..d7e806f 100644 --- a/text-objects.c +++ b/text-objects.c @@ -66,7 +66,7 @@ static Filerange text_object_customword(Text *txt, size_t pos, int (*isboundary) } Filerange text_object_word(Text *txt, size_t pos) { - return text_object_customword(txt, pos, is_word_boundry); + return text_object_customword(txt, pos, is_word_boundary); } Filerange text_object_longword(Text *txt, size_t pos) { @@ -117,7 +117,7 @@ Filerange text_object_longword_outer(Text *txt, size_t pos) { } Filerange text_object_word_outer(Text *txt, size_t pos) { - return text_object_customword_outer(txt, pos, is_word_boundry); + return text_object_customword_outer(txt, pos, is_word_boundary); } Filerange text_object_word_find_next(Text *txt, size_t pos, const char *word) { |
