* are, or 1 otherwise. If allow_tabcomp is nonzero, allow incomplete
* names that would be matches for the operating directory, so that tab
* completion will work. */
-int check_operating_dir(const char *currpath, int allow_tabcomp)
+int check_operating_dir(const char *currpath, bool allow_tabcomp)
{
/* The char *full_operating_dir is global for mem cleanup. It
* should have already been initialized by init_operating_dir().
update_line(current, current_x);
}
-void do_left(int allow_update)
+void do_left(bool allow_update)
{
size_t pww_save = placewewant;
if (current_x > 0)
do_left(TRUE);
}
-void do_right(int allow_update)
+void do_right(bool allow_update)
{
size_t pww_save = placewewant;
assert(current_x <= strlen(current->data));
* and break out of the loop. Otherwise, refresh the screen and
* get out. */
if (do_para_search("e_len, &par_len)) {
- if (full_justify && current != filebot) {
+ if (full_justify && first_par_line != filebot) {
last_par_line = filebot;
break;
} else {
/* More dangerousness fun =) */
current->data = charealloc(current->data,
current_len + key_len + 1);
+
assert(current_x <= current_len);
+
charmove(¤t->data[current_x + key_len],
¤t->data[current_x],
current_len - current_x + key_len);
#endif
#ifndef DISABLE_OPERATINGDIR
void init_operating_dir(void);
-int check_operating_dir(const char *currpath, int allow_tabcomp);
+int check_operating_dir(const char *currpath, bool allow_tabcomp);
#endif
#ifndef NANO_SMALL
void init_backup_dir(void);
void do_page_down(void);
void do_up(void);
void do_down(void);
-void do_left(int allow_update);
+void do_left(bool allow_update);
void do_left_void(void);
-void do_right(int allow_update);
+void do_right(bool allow_update);
void do_right_void(void);
/* Public functions in nano.c. */
#ifndef NANO_SMALL
search_history.current = search_history.next;
#endif
- /* Put answer up on the statusbar. */
- do_gotoline(-1, FALSE);
- /* Fall through. */
+ do_gotoline(-1, FALSE); /* Put answer up on the
+ * statusbar and fall
+ * through. */
default:
return -1;
}