start word nav
This commit is contained in:
25
main.c
25
main.c
@@ -122,6 +122,7 @@ void editor_set_status(const char *fmt, ...);
|
|||||||
void die(const char *s);
|
void die(const char *s);
|
||||||
int get_winsz(int *rows, int *cols);
|
int get_winsz(int *rows, int *cols);
|
||||||
void goto_line(void);
|
void goto_line(void);
|
||||||
|
int cursor_at_eol(void);
|
||||||
void delete_row(int at);
|
void delete_row(int at);
|
||||||
void row_append_row(struct erow *row, char *s, int len);
|
void row_append_row(struct erow *row, char *s, int len);
|
||||||
void row_insert_ch(struct erow *row, int at, int16_t c);
|
void row_insert_ch(struct erow *row, int at, int16_t c);
|
||||||
@@ -508,6 +509,30 @@ goto_line(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
cursor_at_eol(int curx, int cury)
|
||||||
|
{
|
||||||
|
assert(curx >= 0);
|
||||||
|
assert(cury >= 0);
|
||||||
|
assert(cury < editor.nrows);
|
||||||
|
assert(curx < editor.row[cury].size);
|
||||||
|
|
||||||
|
return curx == editor.row[cury].size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
find_next_word()
|
||||||
|
{
|
||||||
|
int x = editor.curx;
|
||||||
|
int y = editor.cury;
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
delete_row(int at)
|
delete_row(int at)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user