I'm working in my main branch of my fork to have separated window and rendering logic from buffer editing operations, enabling independent window scrolling. Once I have that done I will raise a PR. It also includes toggle-truncate-lines and POSIX 2001 compliance.
Independent window Scrolling
Have separated window and rendering logic from buffer editing operations, enabling independent window scrolling.
Buffer-Centric Cursor Management
The buffer cursor remains the source of truth for navigation and editing. The struct editorWindow now includes cx and cy fields, but these are only used to bookmark the buffer cursor position when switching away from a window operations.
Screen Cursor Migration
scx and scy (screen cursor) moved from buffer to window struct.
Used exclusively for rendering the displayed cursor.
Scroll Offset Migration
rowoff (row offset) moved from buffer to window struct.
Added coloff (column offset) to window struct for horizontal scrolling.
Rendering Function Refactor
Rendering functions now based on editorWindow struct instead of editorBuffer.
editorScroll doesn't have arguments anymore (its happier now)
Window Height
screenrows and screencols stil represent total terminal height and width.
Window struct has its own height.
No window width only screencols (side-by-side windows not planned).
Can disable line wrap in current buffer
M-x toggle-truncate-lines or C-x x t - Toggles line wrap off/on
POSIX 2001 Compliance
Added compiler flags for C99 and POSIX 2001 compliance.
Replaced strdup with custom stringdup function in main.c
I'm working in my main branch of my fork to have separated window and rendering logic from buffer editing operations, enabling independent window scrolling. Once I have that done I will raise a PR. It also includes toggle-truncate-lines and POSIX 2001 compliance.
Independent window Scrolling
Have separated window and rendering logic from buffer editing operations, enabling independent window scrolling.
Buffer-Centric Cursor Management The buffer cursor remains the source of truth for navigation and editing. The struct editorWindow now includes
cx
andcy
fields, but these are only used to bookmark the buffer cursor position when switching away from a window operations.Screen Cursor Migration
Scroll Offset Migration
coloff
(column offset) to window struct for horizontal scrolling.Rendering Function Refactor
editorBuffer
.Window Height
Can disable line wrap in current buffer
M-x toggle-truncate-lines
orC-x x t
- Toggles line wrap off/onPOSIX 2001 Compliance