Skip to content

TEdit Menus: MB.ADD of a FIELD causes TEdit window to always scroll so that end of field is on top line - even if this is not called for #1952

Open
@fghalasz

Description

@fghalasz

MB.ADD of a FIELD causes TEdit window to always scroll so that end of field is on top line - even if this is not called for.

Example:

> (SETQ MD '((FIELD (FIELDTYPE STRING) (PRELABEL "aaa") (IDENTIFIER aaa) (INITSTATE
"aaa")) EOL (FIELD (FIELDTYPE STRING) (PRELABEL "bbb") (IDENTIFIER bbb) (INITSTATE
"bbb")) EOL (FIELD (FIELDTYPE STRING) (PRELABEL "ccc") (IDENTIFIER ccc) (INITSTATE
"ccc")) EOL))
((FIELD (FIELDTYPE STRING) (PRELABEL "aaa") (IDENTIFIER aaa) (INITSTATE "aaa")) EOL (FIELD (FIELDTYPE STRING) (PRELABEL "bbb") (IDENTIFIER bbb) (INITSTATE "bbb")) EOL (FIELD (FIELDTYPE STRING) (PRELABEL "ccc") (IDENTIFIER ccc) (INITSTATE "ccc")) EOL)

> (SETQ TS (TEXTSTREAM (TEDIT)))
#<IO Text Stream/146,176100>

> (MB.ADD MD TS)
19

Here is the TEdit window immediately after the MB.ADD
AA

Here is the same TEdit window after scrolling up a bit
BB

Clearly the MB.ADD succeeded, it just scrolled the final EOL to the top line of the window.

I tried to track this down a bit. For some reason \TEDIT.VISIBLECARETP (inside TEDIT.NORMALIZECURSOR inside TEDIT.INSERT.OBJECT inside MB.FIELD.CREATE) is returning NIL when (I think) it should be returning a value. Looks like a timing issue of some sort - but way to complicated for me to track down further.

Also seems like this might be related to Issue# 1950.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working (as per documentation)

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions