Compare commits

...

5 Commits

5 changed files with 28 additions and 51 deletions

View File

@ -1,6 +1,11 @@
# 🎀 Changelog
## [2.2.0] - 2022-12-25
## [2.2.1] - 2023-12-26
## Fixed
- Removed a left over debug print
- Recover panic in `hilbish.goro`
## [2.2.0] - 2023-12-25
### Added
- [Native Modules](https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.module/)
- Made a few additions to the sink type:
@ -688,6 +693,7 @@ This input for example will prompt for more input to complete:
First "stable" release of Hilbish.
[2.2.1]: https://github.com/Rosettea/Hilbish/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/Rosettea/Hilbish/compare/v2.1.0...v2.2.0
[2.1.2]: https://github.com/Rosettea/Hilbish/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/Rosettea/Hilbish/compare/v2.1.0...v2.1.1

6
api.go
View File

@ -494,6 +494,12 @@ func hlgoro(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
// call fn
go func() {
defer func() {
if r := recover(); r != nil {
// do something here?
}
}()
_, err := rt.Call1(l.MainThread(), rt.FunctionValue(fn), c.Etc()...)
if err != nil {
fmt.Fprintln(os.Stderr, "Error in goro function:\n\n", err)

View File

@ -284,56 +284,22 @@ function Greenhouse:initUi()
ansikit.clear(true)
self:draw()
hilbish.goro(function()
while not done do
local c = read()
self:keybind('Ctrl-D', function()
done = true
end)
if self.keybinds[c] then
self.keybinds[c](self)
else
self:input(c)
end
--[[
if c == 27 then
local c1 = read()
if c1 == 91 then
local c2 = read()
if c2 == 66 then -- arrow down
self:scroll 'down'
elseif c2 == 65 then -- arrow up
self:scroll 'up'
end
if c2 == 49 then
local c3 = read()
if c3 == 59 then
local c4 = read()
if c4 == 53 then
local c5 = read()
if c5 == 67 then
self:next()
elseif c5 == 68 then
self:previous()
end
end
end
end
end
goto continue
end
]]--
::continue::
end
end)
while not done do
--
local c = read()
self:keybind('Ctrl-Q', function()
done = true
end)
self:keybind('Ctrl-D', function()
done = true
end)
if self.keybinds[c] then
self.keybinds[c](self)
else
self:input(c)
end
end
ansikit.showCursor()
ansikit.screenMain()
end

View File

@ -4,7 +4,6 @@ bait.catch('hilbish.init', function()
if os.date '%m' == '12' and hilbish.interactive and hilbish.opts.crimmas then
local crimmas = math.random(1, 31)
print(crimmas)
if crimmas >= 25 and crimmas <= 29 then
print(lunacolors.format '🎄 {green}Merry {red}Christmas{reset} from your {green}favourite{reset} shell {red}(right?){reset} 🌺')
end

View File

@ -11,7 +11,7 @@ var (
// Version info
var (
ver = "v2.2.0"
ver = "v2.2.1"
releaseName = "Poppy"
gitCommit string