Commit Briefs




Omar Polo

rework color management: introduce the trailing props

now, instead of prefix and line style, I'm adding the trailing style too. This changed the configuration syntax too.



Omar Polo

first scratch for colour support!


Omar Polo

work around some GCC warnings

clang doesn't emit any. To be honest, some of them are actually right (like the missing `void'), others are impossible but still it's not a bad idea to initialize some variable. Future me maybe will be thankful.





Omar Polo

move all cmd_* functions in their own file

this detangles definitely the commands from the ui. Various variables and struct from ui.c needed to be exported, aside from that, no functional changes.


Omar Polo

optimize redraw_window

don't redraw the page if no scrolling happened. There's still need to ``force'' the redraw sometimes, like after a resize or after toggling olivetti-mode, so add a buffer->force_redraw flag for it.


Omar Polo

disentangle cmd_scroll_line_up/down and ncurses

cmd_scroll_line_up and down are the fundamental functions called every time there's a need to scroll the window. cmd_scroll_up/down calls them in a loop, cmd_next_line and cmd_previous_line calls them too. And so on. These two functions, historically predates some of the abstractions of the `struct buffer', and handle ncurses directly using wscrl and print_line. However, since dispatch_stdio calls redraw_tab anyway, there's no need to update the window content here. (Well, wscrl + one print_vline *may* be a bit faster than the loop over print_vline in redraw_window, but we can optimise the latter later.) This also (should) dis-entangle the cmd_* functions and ncurses completely \o/


Omar Polo

style