Author Topic: mouseover number popup  (Read 1298 times)

Graeme

  • Senior Community Member
  • Posts: 2363
  • Hero Points: 311
mouseover number popup
« 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.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4922
  • Hero Points: 402
Re: mouseover number popup
« Reply #1 on: September 14, 2019, 03:21:45 pm »
The wide column problem is fixed for beta 4. Interesting point about single digit numbers.

wgcreech

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: mouseover number popup
« Reply #2 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.

Mike

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 100
  • Hero Points: 20
Re: mouseover number popup
« Reply #3 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".
« Last Edit: September 23, 2019, 08:51:36 pm by Mike »

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1135
  • Hero Points: 107
Re: mouseover number popup
« Reply #4 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.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4922
  • Hero Points: 402
Re: mouseover number popup
« Reply #5 on: September 25, 2019, 03:12:11 pm »
Turning off number popups will work much better in the next build.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2811
  • Hero Points: 425
Re: mouseover number popup
« Reply #6 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.

b

  • Senior Community Member
  • Posts: 305
  • Hero Points: 26
Re: mouseover number popup
« Reply #7 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.


LBCEi

  • Senior Community Member
  • Posts: 186
  • Hero Points: 14
Re: mouseover number popup
« Reply #8 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.

Graeme

  • Senior Community Member
  • Posts: 2363
  • Hero Points: 311
Re: mouseover number popup
« Reply #9 on: September 26, 2019, 05:23:26 am »
Good idea, if you hold the cursor over the e in true, you get a popup.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2811
  • Hero Points: 425
Re: mouseover number popup
« Reply #10 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.

LBCEi

  • Senior Community Member
  • Posts: 186
  • Hero Points: 14
Re: mouseover number popup
« Reply #11 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


Graeme

  • Senior Community Member
  • Posts: 2363
  • Hero Points: 311
Re: mouseover number popup
« Reply #12 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

« Last Edit: September 26, 2019, 11:34:25 pm by Graeme »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2811
  • Hero Points: 425
Re: mouseover number popup
« Reply #13 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.

LBCEi

  • Senior Community Member
  • Posts: 186
  • Hero Points: 14
Re: mouseover number popup
« Reply #14 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?