|
|
8ad5cc77c3
|
change colour of text in search bar as well
|
2025-09-27 08:35:52 +01:00 |
|
|
|
5e9872e4d6
|
better visual positioning for cursor
|
2025-09-27 08:14:22 +01:00 |
|
|
|
2c388899ca
|
use different colours for program
|
2025-09-27 08:00:21 +01:00 |
|
|
|
961ce63023
|
begin refactoring to let cursor move to very last char of file (including unix line ending)
|
2025-09-23 10:50:10 +01:00 |
|
|
|
21e12addf3
|
in text builders, check when on newline if this is the second last character in the file, and draw it on a newline if so. This is to align with the design decision that we want the second-last character to be selectable
|
2025-09-23 09:16:02 +01:00 |
|
|
|
d63201ada7
|
reimplement vi's 'l' motion so that we only skip a newline when it is preceded by a non-newline character
|
2025-09-21 17:49:30 +01:00 |
|
|
|
97936b83a0
|
in TextBuilder functions, when we encounter a newline, we want any cursor here to be drawn after a linebreak (after the posX and posY values go to the next line) and not before
|
2025-09-16 22:29:19 +01:00 |
|
|
|
169f96f459
|
fix exception when the buffer is empty
|
2025-09-16 04:35:49 +01:00 |
|
|
|
ae1772605b
|
in TextBuilderWithHighlight.build, check when we encounter a \n if we would be past the last line, and return the acc if so, or else continue looping
|
2025-09-14 10:39:51 +01:00 |
|
|
|
0632f7a969
|
add horizontal scrolling functionality to SearchBar
|
2025-09-14 10:07:43 +01:00 |
|
|
|
428208f9bf
|
when text is wide enough to be centered, also centre the search bar
|
2025-09-14 09:14:22 +01:00 |
|
|
|
4bc6c54951
|
in TextBuilder.build functions, when we encounter a space, check if we are before the scroll column's start, and set the x position to startX if so. This is done in preparation for the character which is actually at the scroll column's start, which will be added at the wrong offset unless we do this.
|
2025-09-14 08:42:46 +01:00 |
|
|
|
120568a18d
|
modify 'TextBuilder.initEnv' function to take 'startX' and 'startY' parameters, instead of hardcoding the startX/Y inside the function, and change width/height calculations to take these parameters into account
|
2025-09-14 08:24:37 +01:00 |
|
|
|
2ab48626cd
|
remove 'skipToFirstVisibleColumn' function in TextBuilder, as control flow is simpler if we have fewer mutually recursive functions and we can implement its functionality in the 'build' function instead. Also change the 'z' values for cursor and highlight; the cursor should appear above the highlight and now it does, but it previously didn't
|
2025-09-13 23:22:40 +01:00 |
|
|
|
a3b00e09d8
|
port over bug fixes from mutually recursive functions from test-builder-with-cursor.sml to text-builder-with-highlight.sml
|
2025-09-13 03:02:13 +01:00 |
|
|
|
916e94eaaa
|
fix bug: when we want to skip to next line in TextBuilderWithCursor, we were using binary search on the search list. The search list contained the indices of matched searches, but what we wanted to use binary search on are the lines, as the lines can help us find the next linebreak if any. So, we perform binary search on the lines vector this time to fix the bug.
|
2025-09-13 02:48:07 +01:00 |
|
|
|
20a542df29
|
in BinSearch.equalOrMore and BinSearch.equalOrLess, return ~1 if no item is found, for the sake of less ambiguity in usage. Functions that call these have also been adapted.
|
2025-09-13 02:18:14 +01:00 |
|
|
|
9e76a38ece
|
fix bug in 'TextBuilderUtils.initEnv'. When we have a wide enough space that we can centre the text, we set the 'scrollColumnEnd' field to the length of how many columns we can display. However, we want 'scrollColumnEnd' to contain the last column that can be drawn, not the length of how many columns we can draw. So now we have fixed tis.
|
2025-09-13 01:16:29 +01:00 |
|
|
|
295bdc35cf
|
fix bug where some lines were not scrolling horizontally properly. The issue was that, when encountering a line break in 'skipToFirstVisualColumn' function, we should have recursively called the 'skipToFirstVisualColumn' function instead of the 'build' function. The reason is that our current column after a line break is 0, but we don't know if the start column to display is necessarily 0 in all cases.
|
2025-09-13 00:14:07 +01:00 |
|
|
|
b9e2da3ff9
|
add function to skip to first visible column in TextBuilderWithCursor (sometimes the function is buggy, which I need to fix)
|
2025-09-13 00:02:44 +01:00 |
|
|
|
422d6ad9ac
|
fix bugs in implementing and using text buffer. Some functions did not save the drawMsg to the app's state, which we means we didn't draw in those cases. The text builder functions also drew cursors on characters even when the cursor is not at this position. Both of these bugs are fixed.
|
2025-09-12 23:21:53 +01:00 |
|
|
|
77a64ae794
|
previously forgot to draw char in text builder, but we do that now
|
2025-09-12 14:02:38 +01:00 |
|
|
|
de57af242b
|
create text builder function to call for normal mode
|
2025-09-12 12:05:57 +01:00 |
|
|
|
67db4804fb
|
implement function to initialise env for text builder
|
2025-09-12 11:17:11 +01:00 |
|
|
|
9254fa9f5c
|
create text builder with highlight
|
2025-09-12 10:42:13 +01:00 |
|
|
|
b6de188f7d
|
create a separate directory for different text builders
|
2025-09-12 08:57:17 +01:00 |
|