SlickEdit Community

Archived Read Only Forums => SlickEdit 2019 v24 Beta Discussion => Topic started by: Graeme on September 14, 2019, 12:29:35 pm

Title: mouseover number popup
Post by: Graeme on September 14, 2019, 12:29:35 pm
In the search results window if you mouse over a number, the info dialog pops up but it is extremely wide, almost monitor width wide.  Also, maybe don't pop up the dialog at all for single digit numbers.
Title: Re: mouseover number popup
Post by: Clark on September 14, 2019, 03:21:45 pm
The wide column problem is fixed for beta 4. Interesting point about single digit numbers.
Title: Re: mouseover number popup
Post by: wgcreech on September 20, 2019, 10:08:45 pm
Found the turnoff for this feature added in Beta4 under General Appearance ...

Also, noticed that when turned off, had to close the file that I was working with and then reopen.  Apply did not do the trick like I figuered it would ... even more strange was that only had to open and close the one file ... other files seemed ok ... perhaps all I needed to do was switch focus to another file and then come back ... at any rate, finally turned it off ... feature is sort of nice, but not as a default on ... at least it works now ... would recommend making default off, or making it a right click select.  Very annoying if the file has a lot of numbers (like a .csv file) ... glad I can at least turn it off now.
Title: Re: mouseover number popup
Post by: Mike on September 23, 2019, 08:42:35 pm
In case other users run into this, the setting to toggle this feature is in:
'Tools > Options > Appearance > General' / "Show number base popups".
Title: Re: mouseover number popup
Post by: patrick on September 24, 2019, 02:04:48 pm
@wgcreech
For it still getting a popup after you turn it off, I can see it, but it only for the last number I hovered over.  I think we're caching something for the last popup, and that's not being cleared when the number popups are turned off.  I'll take closer look later today, thanks.
Title: Re: mouseover number popup
Post by: Clark on September 25, 2019, 03:12:11 pm
Turning off number popups will work much better in the next build.
Title: Re: mouseover number popup
Post by: Dennis on September 25, 2019, 03:53:29 pm
I am also adding a tweak to disable the popups for specifically "0" and "1".  It was suggested to disable it for all single digit numbers, but because of the binary number formatting, only 0 and 1 actually have no interesting conversions.  Note that you will still get popups for 0x00 or 001 or other non-trivial representations of 0 and 1.
Title: Re: mouseover number popup
Post by: b on September 25, 2019, 10:47:20 pm

Noticed that it ignores negative values (treats them as positive).  The conversions on the pop up really aren't that interesting if it doesn't show the correct equivalent.

Title: Re: mouseover number popup
Post by: LBCEi on September 26, 2019, 01:15:43 am
You may want to try to restrict this to "whole words" as well.  For example abc123 will activate the popup if you hover over the 123.  I can't think of many use cases where that would be useful.  I guess the exception is for hex, etc. numbers, but that shouldn't be too hard to differentiate.

Keep up the good work on this excellent tool.  It has made my work much easier over the years.
Title: Re: mouseover number popup
Post by: Graeme on September 26, 2019, 05:23:26 am
Good idea, if you hold the cursor over the e in true, you get a popup.
Title: Re: mouseover number popup
Post by: Dennis on September 26, 2019, 05:27:57 pm
@Graeme:  I can not reproduce that.  What language mode were you in?  Are you certain it was a number popup, and not just symbol mouse-over for the symbol 'true'

@b:  I am adding some tweaks for handling negative numbers.  The tricky bit is differentiating unary minus from binary minus, especially in comments and plain text.  I am putting in some very primitive logic based on the first non-blank character to the left of the '-' sign, but it there is no way to handle all cases.

@LBCEi:  I am adding some logic to screen these out.  Thanks for bringing this one to my attention.
Title: Re: mouseover number popup
Post by: LBCEi on September 26, 2019, 08:41:47 pm
Here is something interesting.  In the following code beta 4 gives a number popup over the zero character in the end-of-line comment but it gives a symbol definition popup over the zero character in the doc comment (DMA0 is defined in a #define).  Kind of odd, don't you think?

Code: [Select]
/**
 * @brief Interrupt service routine for DMA0 end of major frame interrupt
 * @return void
 */
void DMA0_ISR(void)
{
    DMA0->CINT = DMA_CINT_CINT(0); // clear DMA0 interrupt

Title: Re: mouseover number popup
Post by: Graeme on September 26, 2019, 11:28:03 pm
This is in the search results window.
With slick V23.0.0.11 and the file was slick C window.e

Title: Re: mouseover number popup
Post by: Dennis on September 26, 2019, 11:57:19 pm
@LBCEi: That exposes a very minor bug, that with the new logic not to evaluate numbers that are at the end of an identifier wouldn't even matter anyway, but I have a fix queued up.

@Graeme:  Thanks that helps me reproduce the issue.  It is fixed in the next build.
Title: Re: mouseover number popup
Post by: LBCEi on September 27, 2019, 02:07:54 am
Thanks for looking at this. Any thoughts on why the identical string brings up different popups in different types of comments?