Commit graph

24 commits

Author SHA1 Message Date
umbraticus@prosimetrum.com 6730cc562d make = command's output plumbable
This patch makes sam's = cmd output what seems to me a more
useful (plumbable) format: /full/path/to/file:addr , where
addr is line(s) under = and rune(s) under =#.
2022-05-30 21:55:36 -04:00
Igor Böhm a73f41bf4e sam: fix spurious overwrite message (patch from plan9port)
Fixes:

% sam -d
 -.
w /tmp/foo
/tmp/foo: (new file) #0
w /tmp/foo
?warning: write might change good version of `/tmp/foo'
2021-10-05 09:27:45 +00:00
sl 29e8ea26f2 sam/{address.c, sam.h}: bump STRSIZE to 512MB (thanks, Ori_B) 2021-02-19 21:15:15 -05:00
Ori Bernstein 5d7e9bee3c Bump protocol version for Ttclick 2020-04-25 09:38:02 -07:00
Ori Bernstein f616a0c1bd triple click selection in sam
three clicks selects a whitespace-delimited line.
2020-04-25 08:57:26 -07:00
Sigrid 446e454c5a sam: ^ does not need current file 2020-03-09 13:58:41 +01:00
Sigrid 27f36483d4 sam: add $%dot (thanks kvik) 2020-03-09 13:21:50 +01:00
Ori Bernstein a181f3dd3e acme, sam: handle >1GB files correctly
imported from plan9port, edfe3c016fe6ef10c55f7a17aab668214ec21efc
2019-12-04 11:46:42 -08:00
BurnZeZ 84e019aba3 fix misleading/wrong fd checks 2018-10-20 18:44:09 +00:00
ftrvxmtrx ab3492f05e sam: putenv("%", ...): don't crash when no file is current 2016-09-26 23:00:06 +02:00
cinap_lenrek d8b4f95476 sam: use $% instead of $f for filename to be consistent with acme 2016-09-22 11:04:43 +02:00
cinap_lenrek 52cacba37c sam: make current filename available to shell commands in $f (thanks aiju) 2016-09-22 10:49:48 +02:00
cinap_lenrek da689241d0 sam: prevent array overflow with multiple -i and -a arguments (thanks clsmith) 2015-04-28 19:30:52 +02:00
ftrvxmtrx 758496ecaa sam: '^' and '_' cmds; same as '<' and '|' except that stdout goes to the command window 2014-12-21 01:28:14 +01:00
cinap_lenrek 50e2c9b4d4 sam, acme: fix character classes quoting for 21-bit runes
quote handling was broken with 21-bit runes. nextrec()
returned quoted rune as long rune | (Runemax+1) to escape
it.

with 16-bit runes, storing that long into 16-bit Rune
would automatically remove the escaping, but with 21-bit
runes, Rune is uint32 so the escaping would remain. we
now use (Runemask+1) instead, and mask the escaping off
explicitely when storing back to Rune.
2014-04-01 06:04:00 +02:00
cinap_lenrek 667010554b make all the commands agnostic about Rune width. (from sources) 2013-04-24 20:13:18 +02:00
ppatience0 02f60df0f3 sam, samterm: add -i flag to make tab insert spaces up to the next tabstop and backspace to delete spaces until the previous tabstop 2013-04-04 16:38:36 -04:00
cinap_lenrek 6cadd03bbe fix utf and rune handling in preparation for 32bit runes 2012-12-31 21:09:46 +01:00
aiju c2304e9329 make sam jump to changes made by undo 2012-08-01 23:14:39 +02:00
cinap_lenrek 8562240e8c fix more fd <= 0 bugs 2012-04-24 06:57:02 +02:00
cinap_lenrek 105ebc327a sam: fix memory leak for name in fwrite 2012-01-29 03:21:09 +01:00
cinap_lenrek c8c58f8cfd sam: fix memory leak 2011-08-17 17:48:43 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00