2024-11-18 09:53:55 +00:00
|
|
|
#ifndef LINE_ED_REFRESH_H_
|
|
|
|
|
#define LINE_ED_REFRESH_H_
|
|
|
|
|
|
|
|
|
|
struct line_ed;
|
|
|
|
|
|
|
|
|
|
struct refresh_state {
|
|
|
|
|
/* cursor position before the update was performed (excluding the prompt) */
|
2024-12-13 17:20:45 +00:00
|
|
|
size_t r_prev_cursor_x, r_prev_cursor_y;
|
2024-11-18 09:53:55 +00:00
|
|
|
/* when a backspace results in two separate lines being combined,
|
|
|
|
|
* this property contains the length of the first of the two combined
|
|
|
|
|
* lines BEFORE the concotenation was performed */
|
2024-12-13 17:20:45 +00:00
|
|
|
size_t r_prev_line_len;
|
2024-11-18 09:53:55 +00:00
|
|
|
};
|
|
|
|
|
|
2024-12-13 17:20:45 +00:00
|
|
|
extern void print_text(struct line_ed *ed, size_t x, size_t y, const char *s);
|
2024-11-18 09:53:55 +00:00
|
|
|
extern void print_buffer(struct line_ed *ed);
|
|
|
|
|
extern void put_refresh(struct line_ed *ed, struct refresh_state *state);
|
|
|
|
|
extern void backspace_nl_refresh(struct line_ed *ed, struct refresh_state *state);
|
|
|
|
|
extern void backspace_simple_refresh(struct line_ed *ed, struct refresh_state *state);
|
|
|
|
|
|
|
|
|
|
#endif
|