A .gitignore => .gitignore +2 -0
@@ 0,0 1,2 @@
+/main.fnl
+/polywell-standalone
M Changelog.md => Changelog.md +4 -0
@@ 1,3 1,7 @@
+# 0.9.5 / ???
+
+* Experimental support for running in a terminal.
+
# 0.9.0 / 2020-10-27
* New alt-x `execute` command.
M Makefile => Makefile +8 -1
@@ 1,4 1,4 @@
-FENNEL=polywell/*.fnl polywell/frontend/love.fnl config/*.fnl
+FENNEL=polywell/*.fnl polywell/frontend/*.fnl config/*.fnl
LOVE ?= love
count: ; cloc $(FENNEL)
@@ 6,3 6,10 @@ count: ; cloc $(FENNEL)
fuzz: ; $(LOVE) $(PWD) --fuzz
ci: check fuzz count
+
+main.fnl: main.lua ; antifennel $^ > $@
+
+polywell-standalone: main.fnl $(FENNEL)
+ echo "#!/usr/bin/env luajit" > $@
+ fennel --metadata --require-as-include --compile $< >> $@
+ chmod 755 $@
M main.lua => main.lua +1 -2
@@ 81,8 81,7 @@ if not _G.love then -- terminal event loop
end, function(e)
term.setsanemode()
print(e, debug.traceback())
- os.exit(1)
+ frontend.quit()
end)
end
end
-
M polywell/commands.fnl => polywell/commands.fnl +0 -35
@@ 134,45 134,10 @@ Takes a style arg which can be :vertical, :horizontal, :triple, or nil."
(editor.echo (tostring (editor.get-prop prop))))
{:completer (partial completion.for prop-names)})))
-;;; movement
-
-;; backward_char
-;; backward_word
-;; beginning_of_buffer
-;; beginning_of_input
-;; beginning_of_line
-;; end_of_buffer
-;; end_of_line
-;; forward-char
-;; forward_word
-;; jump_to_mark
-;; next_line
-;; prev_line
-;; scroll_down
-;; scroll_up
-
(fn go-to-line []
"Prompt for a line number and jump to it."
(editor.read-line "Go to line: " (fn [l] (editor.go-to (tonumber l)))))
-;;; edits and clipboard
-
-;; delete_backwards
-;; delete_forwards
-;; forward_kill_word
-;; kill_line
-;; kill_region
-;; kill_ring_save
-;; backward_kill_word
-;; newline
-;; newline_and_indent
-;; mark
-;; no_mark
-;; system_copy_region
-;; system_yank
-;; yank
-;; yank_pop
-
;;; search
(fn search [original-dir]
M polywell/old.fnl => polywell/old.fnl +4 -2
@@ 621,10 621,12 @@ Shows in the minibuffer."
(set state.b.point (# (. state.b.lines state.b.point-line)))))
:no-mark (fn [] (set (state.b.mark state.b.mark-line state.active-prefix)
nil))
- :open-in-split (fn [...] (local (current-b w h) (values state.b (frontend.get-wh)))
+ :open-in-split (fn [...]
+ (local (current-b w h) (values state.b (frontend.get-wh)))
(open ...)
(set state.window 1)
- (set state.windows [[[10 10 (- (/ w 2) 10) h] current-b] [[(+ (/ w 2) 10) 10 (/ w 2) h] state.b]]))
+ (set state.windows [[[10 10 (- (/ w 2) 10) h] current-b]
+ [[(+ (/ w 2) 10) 10 (/ w 2) h] state.b]]))
:prev-line (fn [] (if (> state.b.point-line 1)
(set state.b.point-line (- state.b.point-line 1))
(set state.b.point 0)))