a fix I think,
(0 ". fs), # 7 u: ft [ 'ft fs' =. {:"1 wd 'sm get term;'
94727 94727 94767
if you rerun the line by bringing up the last line ctrl-shift up, so cursor is
at the end
(0 ". fs), # 7 u: ft [ 'ft fs' =. {:"1 wd 'sm get term;'
94897 94897 94897
it seems like once they get synched they stay synched. I'm unsure how I got
the first result to be 40 off the total... possibly had the cursor early in the
line.
On another note, J has had ctrl-E for a long time. Would defining selection as
the current line if 0 items selected make sense to everyone else, and then a
'sm get termselected;' would return selected or line. Though I guess we can
get it to work properly with unicode.
----- Original Message -----
From: Henry Rich <[email protected]>
To: [email protected]
Cc:
Sent: Friday, July 24, 2015 8:09 AM
Subject: Re: [Jbeta] finddissectline_dissect_, WinSelect_jqtide_ 'sm get term; '
The problem appears to be caused by display of UTF-8, such as boxes.
Here is a display from a fresh session; on each line the cursor was at
the end of the line when ENTER was pressed, so that select should be the
same as the length of the term window:
The 3 numbers are (start of selection),(end of selection),(length of
term window text)
(0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
54 54 54
(0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
118 118 118
(0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
185 185 185
<1
┌─┐
│1│
└─┘
(0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
270 270 286
select has fallen 16 characters behind. 16 is exactly the number of
extra bytes added in converting the 8 boxing characters to UTF-8.
Henry Rich
On 7/24/2015 12:29 AM, 'Pascal Jasmin' via Beta wrote:
> from
> finddissectline_dissect_
>
> there appears to be some magic with
>
> WinSelect_jqtide_
> WinText_jqtide_
>
> but accessing these seem to get stale quickly. ie. doesn't grow despite more
> getting added to console
>
> this line does update a new "winselect" but it seems out of sync
>
> (400 (i.@[ + -~) 0 {.@". fs) {ft [ 'ft fs' =. {:"1 wd 'sm get term;'
> should print the last 400 characters, but
>
> (0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
> 94123 94123 160296
>
> (0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
> 94238 94238 160370
>
> (0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
> 94312 94312 160444
> (0 ". fs), #ft [ 'ft fs' =. {:"1 wd 'sm get term;'
> 94386 94386 160518
>
>
> the last select value is well below the character count. These are 4
> successive calls. Select does not go up by a consistent amount and neither
> does Textcount, though in the last 2 calls there is a consistent 76 increase
> in select and 72 increase in Text
>
> If I were to guess what is happening, for the large discrepancies, is any
> output from 1!:2 does not update fs.
>
> I can point out that finddissectline_dissect_ as a user key breaks fairly
> quickly after starting jqt. Though it does work on startup.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm