about summary refs log tree commit diff stats
path: root/src/kilo.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "stop leaking on the Lua stack"Kartik K. Agaram2021-12-161-1/+0
| | | | | | | This reverts commit 7c1b9d0b91295323b5ed5ec3e09b46566288bc75. The 'big hammer' isn't good enough. The recent changes view seems to need state on the stack across invocations of the editor.
* stop leaking on the Lua stackKartik K. Agaram2021-12-161-0/+1
| | | | | ..even if at the expense of leaking on the heap. Because the Lua stack has very limited space (~20 slots). When it overflows, we segfault.
* commentKartik K. Agaram2021-12-081-0/+2
|
* display line numbersKartik K. Agaram2021-12-081-12/+29
| | | | | Not my aesthetic choice, but essential at the moment for quickly interpreting Lua errors.
* fix a use-after-freeKartik K. Agaram2021-12-081-2/+2
| | | | Introduced Nov 28. Let's see if my intermittent segfaults stop now.
* .Kartik K. Agaram2021-12-071-2/+2
|
* slightly more obvious menu copyKartik K. Agaram2021-12-061-1/+15
| | | | Still sucks, though..
* improve backspace copyKartik K. Agaram2021-12-061-2/+2
|
* more configurable colorsKartik K. Agaram2021-12-061-10/+10
| | | | | Also start using 256 colors, under the assumption most people will have them.
* start showing call stack on errorsKartik K. Agaram2021-12-041-28/+10
| | | | | | | | It turns out Lua has been providing us this information all along! I'd just not created the space on screen to show it. Make it persist better. Kilo now no longer tracks its own status messages, which is a regression in a rare condition.
* support the comment/uncomment hotkey on MacsKartik K. Agaram2021-12-031-2/+2
| | | | | | | ^/ works on Linux but not on Mac ^- emits the same character code on Mac ^_ seems to be the underlying character code, and works on both ctrl-7 also emits the same character code
* less ambiguous menusKartik K. Agaram2021-12-031-4/+4
| | | | | Doesn't make sense to use '/' as a delimiter when we have hotkeys involving '/'.
* get rid of `Esc` hotkeyKartik K. Agaram2021-12-031-5/+5
| | | | | For a variety of historical reasons, terminals pause every time you press `Esc`. Let's get rid of that lag.
* typosKartik K. Agaram2021-12-031-3/+3
|
* experimenting with different keysKartik K. Agaram2021-12-031-0/+2
| | | | | | | | | | | | | | On a Thinkpad X13, the `delete` key emits `^[[3~` outside of Teliva. Within Teliva, ncurses converts it to character code 330 (0x14a), which it fails to recognize as KEY_BACKSPACE. Why? My backspace is converted to character code 263, which ncurses does recognize as KEY_BACKSPACE. ctrl-h is character code 8. Both 330 and 263 are valid Unicode code points, which feels really ugly and ambiguous.
* stop showing frequent save messagesKartik K. Agaram2021-12-031-1/+1
|
* show ^h in a couple more menusKartik K. Agaram2021-12-031-0/+2
|
* improve support for backspaceKartik K. Agaram2021-12-031-3/+7
| | | | | | | I still don't understand the entire state space here, so I'm trying to err on the side of improving discoverability of the `ctrl-h` escape hatch. Without requiring too wide a window to show all hotkeys on the menu.
* stop inserting ctrl- keys into programsKartik K. Agaram2021-11-301-4/+2
|
* kilo bugfix: syntax highlight final word in lineKartik K. Agaram2021-11-291-1/+1
| | | | | Kilo likely never ran into this because it's only been tested on C, which uses semi-colons at the end of each statement.
* gotcha: silent string concatenationKartik K. Agaram2021-11-291-1/+1
|
* redo uncommentKartik K. Agaram2021-11-281-5/+6
| | | | It was printing a phantom null at end of line on screen.
* auto-indentKartik K. Agaram2021-11-281-1/+7
|
* tab key: always insert two spacesKartik K. Agaram2021-11-281-0/+5
|
* hide some 'advanced' hotkeys to support narrow windowsKartik K. Agaram2021-11-281-4/+0
|
* ctrl-/ to comment/uncomment lineKartik K. Agaram2021-11-281-0/+27
|
* ctrl-u/ctrl-k to make editing a bit more ergonomicKartik K. Agaram2021-11-281-1/+17
|
* special indent settings for kiloKartik K. Agaram2021-11-281-0/+3
|
* indentKartik K. Agaram2021-11-281-40/+40
|
* fix half-assed mac os backspace commitKartik K. Agaram2021-11-281-2/+2
|
* editing notes sucks a little lessKartik K. Agaram2021-11-281-2/+8
| | | | | | I think I've gotten rid of all the segfaults, but it's still pretty messed up: if you hit ctrl-g and go edit some definition, it doesn't get saved. You're just storing the edit in the note.
* inline another functionKartik K. Agaram2021-11-281-2/+2
| | | | | I'm going to give up on hiding teliva_editor_buffer from kilo. It was taking too much knowledge of extern function prototypes on both sides.
* standardize filenames that teliva strews on diskKartik K. Agaram2021-11-281-2/+2
| | | | | We still need a proper story for file system side effects. But it's not time yet for sandboxing considerations. Soon, but not yet.
* restore editor state from snapshotKartik K. Agaram2021-11-281-0/+18
|
* save a snapshot of editor state across restartsKartik K. Agaram2021-11-281-0/+2
| | | | | | | | | | | | | | | | We're not using this yet. I agonized over this decision for several weeks. Is Teliva's need to restart with execve an utter hack or a good thing? I'm leaning towards the latter. Constantly exercising the initial flow makes Teliva more crash-only. We can build Steve Yegge's idea of immortality (http://steve-yegge.blogspot.com/2007/01/pinocchio-problem.html) out of crash-only primitives, just by making reboots instantaneous. But focusing directly on immortality tends to compromise crash-only by exercising it more rarely. One other issue this brings up: loading these Lua tables from disk is a vector for arbitrary code execution. I need to fix these when I get to sandboxing.
* fix backspace on MacKartik K. Agaram2021-11-281-1/+1
| | | | | I'm deliberately restricting this incompatibility to the editor environment for now.
* editor hotkeys: sol/eolKartik K. Agaram2021-11-281-4/+19
| | | | | I'm growing attached to ^e, so mildly breaking with convention there. Perhaps this is a bad idea.
* dedup an enumKartik K. Agaram2021-11-261-19/+1
|
* new shortcut: return to big-picture viewKartik K. Agaram2021-11-251-3/+18
|
* make upstream kilo ASan-cleanKartik K. Agaram2021-11-251-3/+4
| | | | | | Many thanks to dirkf for https://github.com/antirez/kilo/pull/73! However, teliva is still not ASan-clean.
* standardize warning flags everywhereKartik K. Agaram2021-11-221-1/+1
| | | | | | | | | | I'd like to enable -Wextra as well, but that creates some false positives. I've at least made my changes clean w.r.t. -Wextra. Now we have 4 remaining warnings with gcc 9.3 that seem genuine. Need to fix those.
* .Kartik K. Agaram2021-11-221-13/+8
|
* cleaner error handlingKartik K. Agaram2021-11-141-4/+2
|
* remain in editor on errorKartik K. Agaram2021-11-141-0/+11
|
* .Kartik K. Agaram2021-11-141-1/+1
|
* more menu cleanupKartik K. Agaram2021-11-141-7/+12
|
* .Kartik K. Agaram2021-11-141-2/+2
|
* draw the browse dialog the same wayKartik K. Agaram2021-11-141-1/+1
|
* dialogs are not status messagesKartik K. Agaram2021-11-141-3/+8
|
* cleaner dialogsKartik K. Agaram2021-11-141-22/+59
|