Update notes

This commit is contained in:
Krzosa Karol
2024-08-06 18:15:37 +02:00
parent 1145a13987
commit 4aaae7773d
2 changed files with 45 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-peeknamedpipe
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
https://github.com/sheredom/subprocess.h
https://github.com/4coder-archive/4coder/blob/master/platform_win32/win32_4ed.cpp :486
https://stackoverflow.com/questions/67551213/read-processs-stdout-output-in-win32-c-desktop-application
https://handmade.network/forums/t/1219-win32_asynchronous_pipes_question
- I guess you can just do color matching in rendering, have a table and try matching words etc.
- maybe I should disallow somehow taking pointers to dynamic array items? Just references!
- create process with buffer (append to end)
- create process and put it at specific cursor position in buffer?
- create process without buffer attached (maybe for error?) (we want some notification that it failed or something)
- code indexing: maybe we can do that line based since you want to jump to line not a particular place.
- on edit we could reparse the line for symbol
- I think 4coder first tries to offset the index file on immediate edit, on frame tick it tries to reparse the modified file in entirety
- offseting things doesn't seem that hard since we already figured it out with cursors
- would it be fast enough to just reparse the entire file of certain size every time?
- coloring seems even more hairy to do correctly because there are multiline comments etc.
- it honestly seems no matter what you do it's a very hairy problem, text was not meant for this

View File

@@ -1,17 +1,32 @@
- search as a command to execute which is going to be in the title bar
- maybe modify api BeginEdit - EndEdit
- clean \r\n into \n on trim and load
- search backwards
- draw indentation levels like in sublime (those lines)
- load all files in a directory
- draw indentation levels like in sublime (those lines) - we render chars one by one so seems relatively easy to figure out if whitespace belongs to beginning of line (make sure to add max value like 40 because of big files)
- code sections, visual demarkation if beginning of line has a very specific text + goto next / goto prev section hotkey!
- change size of command window because it's wacky
- console should save history! Make all commands go through proper history saving route. History friendly append - save cursors, set cursor at end, restore cursors
- word complete
- Search all buffers in 10X style, incrementally searched results popping up on every key press (maybe we need coroutine library in C so this is easier?)
- Implement opening and polling processes, sending info back and forth
- Open git commit using git --no-pager show <hash>
- Implement shell interaction (here we also could use the coroutine library)
- Search and replace
- word complete
- load in a next window
- load in new window
- win32 open file with text editor from desktop
- open file/cmd from cmd
- detach from console when executing the program from the console to make sure that the user won't have to keep the cmd alive
- drag and drop file into the window
- exe icon
- load project command which loads files and config
- load all files in a directory
- global config and local config
- open project from cmd
- page up and down should also scroll and leave you in exactly same scroll
- I think the way sublime text and we display line highlights is confusing with multiple cursors (line highlight can be confused with selection)
- ctrl + delete maybe should stop on new line but it keeps on going, sublime is much more careful with deleting
@@ -28,6 +43,7 @@ BUG: there is a click hang when switching windows sometimes, you click after sel
backlog
- text_editor --record events.txt text_editor --playback events.txt
- make the editor replayable, store events and then replay, be careful about globals
- maybe open should return multiple options if there are many more? (like in sublime if many symbols you get a window and you choose and it automatically jumps you to the symbol in the background)
- we could rewrite kill lines with simpler commands - extend selection to encompass lines->replace