mirror of https://github.com/Hilbis/Hilbish
Compare commits
3 Commits
aa376f9b14
...
fb9d30520a
Author | SHA1 | Date |
---|---|---|
sammyette | fb9d30520a | |
sammyette | 521298733e | |
sammyette | f8a391e24f |
|
@ -1,7 +1,8 @@
|
||||||
# 🎀 Changelog
|
# 🎀 Changelog
|
||||||
|
|
||||||
## Unreleased
|
## [2.2.3] - 2024-04-27
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Highligher and hinter work now, since it was regressed from the previous minor release.
|
||||||
- `cat` command no longer prints extra newline at end of each file
|
- `cat` command no longer prints extra newline at end of each file
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -271,6 +271,15 @@ end
|
||||||
function Greenhouse:input(char)
|
function Greenhouse:input(char)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function read()
|
||||||
|
terminal.saveState()
|
||||||
|
terminal.setRaw()
|
||||||
|
local c = hilbish.editor.readChar()
|
||||||
|
|
||||||
|
terminal.restoreState()
|
||||||
|
return c
|
||||||
|
end
|
||||||
|
|
||||||
function Greenhouse:initUi()
|
function Greenhouse:initUi()
|
||||||
local ansikit = require 'ansikit'
|
local ansikit = require 'ansikit'
|
||||||
local bait = require 'bait'
|
local bait = require 'bait'
|
||||||
|
@ -280,14 +289,17 @@ function Greenhouse:initUi()
|
||||||
local Page = require 'nature.greenhouse.page'
|
local Page = require 'nature.greenhouse.page'
|
||||||
local done = false
|
local done = false
|
||||||
|
|
||||||
bait.catch('signal.sigint', function()
|
local function sigint()
|
||||||
ansikit.clear()
|
ansikit.clear()
|
||||||
done = true
|
done = true
|
||||||
end)
|
end
|
||||||
|
|
||||||
bait.catch('signal.resize', function()
|
local function resize()
|
||||||
self:update()
|
self:update()
|
||||||
end)
|
end
|
||||||
|
bait.catch('signal.sigint', sigint)
|
||||||
|
|
||||||
|
bait.catch('signal.resize', resize)
|
||||||
|
|
||||||
ansikit.screenAlt()
|
ansikit.screenAlt()
|
||||||
ansikit.clear(true)
|
ansikit.clear(true)
|
||||||
|
@ -311,15 +323,10 @@ function Greenhouse:initUi()
|
||||||
|
|
||||||
ansikit.showCursor()
|
ansikit.showCursor()
|
||||||
ansikit.screenMain()
|
ansikit.screenMain()
|
||||||
end
|
|
||||||
|
|
||||||
function read()
|
self = nil
|
||||||
terminal.saveState()
|
bait.release('signal.sigint', sigint)
|
||||||
terminal.setRaw()
|
bait.release('signal.resize', resize)
|
||||||
local c = hilbish.editor.readChar()
|
|
||||||
|
|
||||||
terminal.restoreState()
|
|
||||||
return c
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return Greenhouse
|
return Greenhouse
|
||||||
|
|
Loading…
Reference in New Issue