mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
show preview of buffer on non-terminal debugger
This commit is contained in:
parent
8db1006916
commit
6a057b6b56
@ -34,8 +34,9 @@ wrap_env = function(debug, fn)
|
||||
end
|
||||
wrap_name = function(name)
|
||||
local v = V(name)
|
||||
v = Cmt("", function()
|
||||
iprint("* " .. name)
|
||||
v = Cmt("", function(str, pos)
|
||||
local rest = str:sub(pos, -1):match("^([^\n]*)")
|
||||
iprint("* " .. tostring(name) .. " (" .. tostring(rest) .. ")")
|
||||
indent = indent + 1
|
||||
return true
|
||||
end) * Cmt(v, function(str, pos, ...)
|
||||
|
@ -18,8 +18,10 @@ wrap_env = (debug, fn) ->
|
||||
|
||||
wrap_name = (name) ->
|
||||
v = V name
|
||||
v = Cmt("", ->
|
||||
iprint "* " .. name
|
||||
v = Cmt("", (str, pos) ->
|
||||
rest = str\sub(pos, -1)\match "^([^\n]*)"
|
||||
|
||||
iprint "* #{name} (#{rest})"
|
||||
indent += 1
|
||||
true
|
||||
) * Cmt(v, (str, pos, ...) ->
|
||||
|
Loading…
Reference in New Issue
Block a user