Commit Graph

23279 Commits

Author SHA1 Message Date
fang
0d8288e666
term: better %url handling
%url blits are meant for "activating" urls. Of course, opening a new
browser tab from within a C program is difficult, so we don't do it.

This is still better than doing the faux activation by just printing
the url. term.c no longer really knows where/how to draw it, and it's
meant as interactive behavior rather than visual output, anyway.
2021-02-18 01:44:33 +01:00
fang
a4e20facb7
term: decouple line clearing from line printing
This simplifies the behavior of individual blits, making their
implementation simpler and giving arvo more control.

This lets us write on top of existing content, instead of completely
replacing the affected row. Additionally, lets us draw starting at the
cursor position, instead of the leftmost column.

To retain the previous behavior, preface with [%hop 0] to move the
cursor to the start of the line, [%wyp ~] to clear the existing content,
and finally your %lin to render it.
2021-02-18 01:44:26 +01:00
fang
8a3605f818
term: rename _show_clear to _clear_line 2021-02-17 17:17:46 +01:00
fang
30ac51e281
term: no longer redraw the prompt as part of %clr
Instead, rely on the console application to send whatever is needed
directly following a %clr blit.
2021-02-17 17:04:45 +01:00
fang
75b2c025e5
term: cap & store cursor row position
Adds the vertical position of the cursor to mirror state, and caps the
cursor movement to the edges of the known window.
2021-02-17 01:48:58 +01:00
fang
00dd0656e8
zuse: move styx engine into zuse
styx and stub are both defined in lull. Having functions for dealing
with them in zuse rather than userspace is fitting.

While not a _common_ format per se, it still seems best at home in
+format, instead of on its own.
2021-02-16 17:33:58 +01:00
fang
2e7afdd543
lull: remove old/unused dill tasks
Some of the remainder are still _presently_ unused, but point at
functionality we want to support again in the near future. The ones
removed here are either redundant or have no clear purpose.
2021-02-16 17:33:57 +01:00
fang
53cd568af9
dill: printf when rendering to non-default session
As per the note a couple lines up, +fore depends on drum semantics being
active. We can only guarantee those being present for the default
session, not for any others. So, we print a warning when appropriate.
2021-02-16 17:33:56 +01:00
fang
9f0166914f
dill: tidier gall %onto print
Before recent dill changes, this wouldn't always be visible, since it
would get drawn in place of (and subsequently get overwritten by) the
prompt. Now that it displays consistently again, it should look a bit
better than just a noun dump.

This is somewhat redundant with gall's own "reloading agent" printfs,
but you know what they say: printfs don't real!
2021-02-16 17:33:48 +01:00
fang
c75e0e0394
dill: store sessions by @tas, not duct
This prepares us for actually making use of multiple session in a sane
way.

Notable implicit change is that we no longer crash on an "unrecognized
duct", instead always handling it as destined for the default session.
2021-02-12 00:29:29 +01:00
fang
0b1fde0595
dill: remove now-redundant blits
Previously, these affected dill state. Now, they're equivalent to %lin
and %klr blits.
2021-02-10 20:05:26 +01:00
fang
be8713f151
dill: stop tracking prompt & cursor position
As follow-up to 3fdef1468, we now no longer store the prompt or cursor
in state. These were still used for view initialization, but it's more
appropriate to %hey the underlying console application in those cases.
The scry endpoints we remove, expecting clients that depended on them
to send a %hail instead.
2021-02-10 17:03:03 +01:00
fang
3fdef14688
dill: stop redrawing the prompt & cursor
No longer inserts newlines or redraws the prompt post-print, pushing
this responsibility down to drum where it belongs.

Additionally, separates the flow for dill's own output, from that of the
console application. This lets us keep the desired behavior for now, and
will ease reworking in the future.

Last-printed-line and cursor position are still kept around in dill
state, in order to respond to the relevant scry endpoints. These should
either be refactored to scry into the underlying console app, or be
removed entirely in favor of %hey.
2021-02-10 14:23:17 +01:00
fang
7ab6d7dc9c
term: add minimal mouse support
Only detects mouse clicks. Though, "9" mode seems broken, or unsupported
or something? Probably need to upgrade to "1000" mode or higher, but
that also reports scrolling events and such, which don't want to steal
from the context we're running in just yet.
2021-02-10 14:23:03 +01:00
fang
9631be65ad
vere: remove trailing newlines from u3l_log calls
As of dc2c990c0 these are redundant, and keeping them in would result
in trailing whiteline.

The result is that sometimes we call u3l_log with the empty string. We
simply want it to insert a newline into the scrollback for us. GCC
complains about this, because it leads to using an empty format string,
but we consider this sane behavior. We update the flags accordingly.
2021-02-06 01:02:19 +01:00
fang
dc2c990c0f
term: avoid touching prompt during printf
We want to decouple drum state & semantics from term.c. But we also want
to continue showing printfs without mangling whatever the arvo side is
doing. Short of formalizing various "terminal modes", the best we can do
it assume that the main session is always in drum mode, and use that
assumption to squeeze into the actual content stream when doing printfs.

In essence, we insert the printf between the prompt and content, pushing
the content up into terminal scrollback. Both the prompt and cursor
position are maintained without knowledge of their original states.

Because this logic relies on knowing the (accurate) terminal height, and
this logic being the *only* thing in term.c that reads from the height,
we no longer initialize the terminal size with a sane height. Instead,
we set it to zero, and check for that to determine whether we're ready
to use this logic or not.

Due to the way this inserting works, trailing newlines are no longer
required from the output. For consistency, we manually add trailing
newlines when this logic cannot be used, both in the above-described
circumstance, and the less-common case of u3l_log.
This will of course need to be accounted for in all existing calls to
u3l_log, but we move that into the next commit for readability's sake.
2021-02-06 00:03:56 +01:00
fang
8cfa1516d8
term: refactor CSI escape sequence sending 2021-02-04 00:47:57 +01:00
fang
5d8b44ccbc
dill: support 2d %hop
Instead of confining you to just the bottom row. 0,0 is bottom left.

Doesn't behave exactly as expected for non-zero column coordinates yet,
but all in due time.
2021-01-28 01:20:45 +01:00
fang
3ad0c4e1d0
dill: remove outdated compatibility workaround
Current era runs exclusively on v1.0 and up.
2021-01-27 16:47:43 +01:00
fang
48c9f76ba3
term: move cursor to absolute visual position
Instead of relative, character-based position. In anticipation of
greater degrees of cursor freedom, and so that we don't have to
track invisible characters all the time.
2021-01-26 18:37:34 +01:00
fang
776de8b3d9
lull: make dill-blit explicit superset of blit
Likewise for belt. This necessitates renaming the %mor blit for newlines
to %nel, making this require a new runtime version. That's fine, more
breaking changes are to follow.
2021-01-26 18:37:33 +01:00
Liam Fitzgerald
f88318b1b7
glob: update to 0v7.9mc9i.jbk7p.smfcl.3aose.b6dat 2021-01-24 11:28:33 +10:00
Liam Fitzgerald
e2f3dd2401
Merge pull request #4330 from urbit/mp/links/blank-creation
links: return submit if no 'first item'
2021-01-24 11:17:29 +10:00
Matilde Park
48f34795da links: return submit if no 'first item'
Fixes unfiled bug where creating a new collection returned a blank
screen.
2021-01-23 12:43:19 -05:00
matildepark
c442aac74e
Merge pull request #4328 from urbit/matildepark-patch-1
meta: remove landscape template
2021-01-22 21:42:30 -05:00
Matilde Park
88064e11ee meta: add explainer line 2021-01-22 21:19:39 -05:00
Matilde Park
f2b07df146 meta: add link to urbit/landscape 2021-01-22 17:36:47 -05:00
matildepark
73b1b386a2 meta: remove landscape template 2021-01-22 17:34:58 -05:00
janeway
a9b32192fc glob: update to 0v7.3vkbq.euver.m66ss.rs6kt.06tp8 2021-01-22 17:15:13 -05:00
Matilde Park
8b4aa8755f Merge branch 'mp/hotfix/2021-1-22' (#4327)
* origin/mp/hotfix/2021-1-22:
  chat: disallow markdown links
  landscape: downgrade formik to 2.1.5
  chat: disallow markdown nodes

Signed-off-by: Matilde Park <matilde.park@gmail.com>
2021-01-22 17:06:08 -05:00
Matilde Park
06fab93349 chat: disallow markdown links 2021-01-22 16:56:28 -05:00
Matilde Park
b150e4b1e6 landscape: downgrade formik to 2.1.5
Form behaviours are broken above this version.
2021-01-22 16:47:47 -05:00
Matilde Park
318831f6a9 chat: disallow markdown nodes
Using RemarkBreaks and RemarkDisableTokenizers breaks one or
the other in simultaneous use.

We fall back to escaping markdown tokens we don't want.
2021-01-22 16:47:22 -05:00
Jared Tobin
729802102b
Merge pull request #4324 from urbit/jt/no-cachix-name
Remove use of CACHIX_NAME in build action
2021-01-22 16:03:51 +04:00
Jared Tobin
3c54879627
meta: remove CACHIX_NAME in release-docker action [ci skip]
To be consistent with how 'name' is handled in 928d1b9ceb.
2021-01-22 16:00:07 +04:00
Jared Tobin
928d1b9ceb
meta: remove use of CACHIX_NAME
It appears 'name' must be a constant, so this repeats what was done in
10855b9ec5.
2021-01-22 15:50:46 +04:00
janeway
d16c228870 glob: update to 0v7.ttn7o.50403.rf6oh.63hnc.hgpc9 2021-01-21 19:15:58 -05:00
Matilde Park
604b338dcd Merge branch 'release/next-js' into release/hotfix/2021-1-21 2021-01-21 19:04:47 -05:00
Matilde Park
71e91458c6 landscape: prevent "back" overflow on mobile 2021-01-21 18:58:06 -05:00
Matilde Park
0db868c1a6 publish: fix background when editing 2021-01-21 18:51:29 -05:00
Matilde Park
4afdb19090 links: pad on small devices 2021-01-21 18:31:41 -05:00
Matilde Park
a610471fb7 interface: update dependencies 2021-01-21 18:26:17 -05:00
matildepark
000e94e588
Merge pull request #4321 from tylershuster/hark/dm-layout-fix
fixes urbit/landscape#252
2021-01-21 18:01:53 -05:00
Matilde Park
8df58d47c0 meta: delete accidental package-lock add 2021-01-21 14:19:52 -05:00
matildepark
2f3e7028cd
Merge pull request #4112 from urbit/lf/async-double-submit
AsyncButton: protect against double submit
2021-01-21 14:18:52 -05:00
matildepark
84d23a9308
Merge pull request #4239 from urbit/m/graph-join-backoff
graph: make the join thread back off
2021-01-21 13:27:59 -05:00
Tyler Brown Cifu Shuster
61ec3bb2cf fixes urbit/landscape#252 2021-01-21 07:59:40 -08:00
Liam Fitzgerald
2decc24286
interface: bump indigo 2021-01-21 12:24:19 +10:00
Liam Fitzgerald
85a5488332
AsyncButton: protect against double submit 2021-01-21 11:44:22 +10:00
matildepark
1526912dd6
Merge pull request #4320 from urbit/mp/landscape/sidebar-header
landscape: sidebar header item center, padded
2021-01-20 20:20:25 -05:00