Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 opened this issue Jan 4, 2025 · 0 comments
Assignees
Labels
bug Something isn't working (as per documentation)

Comments

@fghalasz
Copy link
Member

fghalasz commented Jan 4, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (as per documentation)
Projects
Status: No status
Development

No branches or pull requests

2 participants