mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-19 07:46:24 -05:00
insert-string can insert strings up to 512 characters.
This commit is contained in:
parent
a560025c0c
commit
79b57c96d1
4
random.c
4
random.c
@ -1231,11 +1231,11 @@ int fmatch(int ch)
|
|||||||
int istring(int f, int n)
|
int istring(int f, int n)
|
||||||
{
|
{
|
||||||
int status; /* status return code */
|
int status; /* status return code */
|
||||||
char tstring[ NSTRING + 1] ; /* string to add */
|
char tstring[ 512] ; /* string to add */
|
||||||
|
|
||||||
/* ask for string to insert */
|
/* ask for string to insert */
|
||||||
status =
|
status =
|
||||||
mlreplyt("String to insert<META>: ", tstring, NSTRING, metac) ;
|
mlreplyt("String to insert<META>: ", tstring, sizeof tstring - 1, metac) ;
|
||||||
if (status != TRUE)
|
if (status != TRUE)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
10
tststr.cmd
10
tststr.cmd
@ -1,6 +1,13 @@
|
|||||||
; Insert long environment variables [will be truncated to NSTRING - 1 (127)]
|
; Insert long environment variables [will be truncated to NSTRING - 1 (127)]
|
||||||
|
insert-string &env PATH
|
||||||
|
newline
|
||||||
insert-string $PATH
|
insert-string $PATH
|
||||||
newline
|
newline
|
||||||
|
set %mypath $PATH
|
||||||
|
insert-string %mypath
|
||||||
|
newline
|
||||||
|
insert-string &cat "Length of $PATH: " &len $PATH
|
||||||
|
newline
|
||||||
; Insert string with escaped characters
|
; Insert string with escaped characters
|
||||||
insert-string "hello, world~n"
|
insert-string "hello, world~n"
|
||||||
newline
|
newline
|
||||||
@ -41,8 +48,9 @@ insert-string "#12345678901234567890"
|
|||||||
; kill and yank
|
; kill and yank
|
||||||
beginning-of-line
|
beginning-of-line
|
||||||
kill-to-end-of-line
|
kill-to-end-of-line
|
||||||
|
kill-to-end-of-line
|
||||||
|
yank
|
||||||
yank
|
yank
|
||||||
newline
|
|
||||||
; insert kill variable (up to 127 characters), was 25 before fix
|
; insert kill variable (up to 127 characters), was 25 before fix
|
||||||
insert-string $kill
|
insert-string $kill
|
||||||
save-file
|
save-file
|
||||||
|
Loading…
Reference in New Issue
Block a user