summaryrefslogtreecommitdiffstats
path: root/smenu.h
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2019-03-03 15:15:16 +0100
committerpgen <p.gen.progs@gmail.com>2019-03-04 23:04:13 +0100
commitad0e657a5caa85004206aa8068372183bd285338 (patch)
treec635f1f96936e124e3d91f8d914e53aa3b2fbcdb /smenu.h
parent433eb2eb1a660df5fbc32886e63838154b47c14d (diff)
Rewrite move_up/move_down and add helper functions
- The old code did not manage well the cases where some lines where not selectable. - Add tests to validate the new behaviour.
Diffstat (limited to 'smenu.h')
-rw-r--r--smenu.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/smenu.h b/smenu.h
index b2a1500..0103184 100644
--- a/smenu.h
+++ b/smenu.h
@@ -229,6 +229,9 @@ apply_attr(term_t * term, attr_t attr);
int
delims_cmp(const void * a, const void * b);
+long
+get_line_last_word(long line, long last_line);
+
void
move_left(win_t * win, term_t * term, toggle_t * toggle,
search_data_t * search_data, langinfo_t * langinfo, long * nl,
@@ -239,15 +242,23 @@ move_right(win_t * win, term_t * term, toggle_t * toggle,
search_data_t * search_data, langinfo_t * langinfo, long * nl,
long last_line, char * tmp_word);
+int
+find_best_word_upward(win_t * win, term_t * term, long line, long last_word,
+ long s, long e);
+
+int
+find_best_word_downward(win_t * win, term_t * term, long line, long last_word,
+ long s, long e);
+
void
move_up(win_t * win, term_t * term, toggle_t * toggle,
search_data_t * search_data, langinfo_t * langinfo, long * nl,
- long page, long last_line, char * tmp_word);
+ long page, long first_selectable, long last_line, char * tmp_word);
void
move_down(win_t * win, term_t * term, toggle_t * toggle,
search_data_t * search_data, langinfo_t * langinfo, long * nl,
- long page, long last_line, char * tmp_word);
+ long page, long last_selectable, long last_line, char * tmp_word);
/* ***************** */
/* Emums and structs */