Dyalog / ride

Cross-platform IDE for Dyalog APL
https://dyalog.github.io/ride
MIT License
202 stars 31 forks source link

Tips area is off by one #819

Closed abrudz closed 2 years ago

abrudz commented 2 years ago

Describe the issue you are having

Value tips and tips for glyphs react to the positioning of the mouse pointer in an area that is off by one to the right. For example with the text ab+foo we get the value tip for ab when the mouse is over a+ and for + when the mouse is over f and for foo when the mouse is over oo  (including one space beyond the last o).

Did you connect to an already running interpreter or start the interpreter from RIDE?

Start an interpreter

How do you reproduce the issue?

⚙>General>Contextual help ☑︎ Show value tips ☑︎ Show tips for glyphs   OK   ab←42 ⋄ foo←{⍵ ⍵} ↵ Enter ab+foo Step by step, position mouse pointer over each character of the written text in turn, including two positions immediately to the right of foo

Note that is displayed in the tip.

Paste the contents of Help → About (Shift+F1)

IDE:
  Version: 4.4.3676
  Platform: Win32
  Date: 2021-12-14 22:48:37 +0100
  Git commit: 8be66466c2ea7c9cc631f06a54c88133a04a650d
  Preferences:{
    "autoPW":"1",
    "colourScheme":"Nord (1)",
    "colourSchemes":"[{\"name\":\"Dracula (1)\",\"theme\":\"dark\",\"styles\":\"asgn=fg:#50fa7b com=fg:#6272a4 diam=fg:#ff79c6 err=fg:#ff5555,bgo:1,U fn=fg:#8be9fd idm=U kw=fg:#ff79c6 lnum=bgo:0,fg:6272a4 mod=bgo:0.5,bg:#44475a mtch=bgo:0.5,fg:#f8f8f2,bg:#44475a norm=bg:#282a36,bgo:1,fg:f8f8f2 num=fg:#bd93f9 op1=fg:#50fa7b,fgo:1 op2=fg:#f1fa8c quad=fg:#ffb86c sel=bg:#6bb2ff,bgo:0.25 semi=fg:#50fa7b sqbr=fg:#50fa7b srch=bg:#bd93f9,bgo:0.5 str=fg:#f1fa8c tc=bg:#44475a,bgo:1 tcpe=bg:#44475a,bgo:1 zld=fg:#bd93f9 scmd=fg:#ff79c6 ucmd=fg:#ff79c6,B vtt=bg:#44475a,bgo:1 ca=bg:#44475a,bgo:1,fg:#ff5555 cm=bg:#282a36,bgo:1,fg:#50fa7b cv=bg:#44475a,bgo:1,fg:#f1fa8c cvv=bg:#282a36,bgo:1,fg:#8be9fd ma=bg:#44475a,bgo:1,fg:#8be9fd na=bg:#44475a,bgo:1,fg:#bd93f9 qor=bg:#ff5555,bgo:1,fg:#f8f8f2 dc=bg:#7f2a2a,bgo:1 lbl=fg:#ff79c6,B glb=fg:#ffb86c cubr=fg:#f8f8f2 par=fg:#f8f8f2 dfn=fg:#f8f8f2 qdl=fg:#f8f8f2 cur=fg:#f8f8f2,fgo:1 acsl=bg:#bd93f9,bgo:0.25\"},{\"name\":\"Dracula (2)\",\"theme\":\"dark\",\"styles\":\"asgn=fg:#50fa7b com=fg:#6272a4 diam=fg:#ff79c6 err=fg:#ff5555,bgo:1,U fn=fg:#8be9fd idm=U kw=fg:#ff79c6 lnum=bgo:0,fg:6272a4 mod=bgo:0.5,bg:#44475a mtch=bgo:0.5,fg:#f8f8f2,bg:#44475a norm=bg:#282a36,bgo:1,fg:f8f8f2 num=fg:#bd93f9 op1=fg:#50fa7b,fgo:1 op2=fg:#f1fa8c quad=fg:#ffb86c sel=bg:#6bb2ff,bgo:0.5 semi=fg:#50fa7b sqbr=fg:#50fa7b srch=bg:#bd93f9,bgo:0.5 str=fg:#f1fa8c tc=bg:#44475a,bgo:1 tcpe=bg:#44475a,bgo:1 zld=fg:#bd93f9 scmd=fg:#ff79c6 ucmd=fg:#ff79c6,B vtt=bg:#44475a,bgo:1 ca=bg:#44475a,bgo:1,fg:#ff5555 cm=bg:#282a36,bgo:1,fg:#50fa7b cv=bg:#44475a,bgo:1,fg:#f1fa8c cvv=bg:#282a36,bgo:1,fg:#8be9fd ma=bg:#44475a,bgo:1,fg:#8be9fd na=bg:#44475a,bgo:1,fg:#bd93f9 qor=bg:#ff5555,bgo:1,fg:#f8f8f2 dc=bg:#7f2a2a,bgo:1 lbl=fg:#ff79c6,B glb=fg:#ffb86c cubr=fg:#f8f8f2 par=fg:#f8f8f2 dfn=fg:#f8f8f2 qdl=fg:#f8f8f2 cur=fg:#f8f8f2,fgo:1 acsl=bg:#bd93f9,bgo:0.25\"},{\"name\":\"New Moon (1)\",\"theme\":\"dark\",\"styles\":\"asgn=fg:#6ab0f3 com=fg:#777c85 diam=fg:#ffeea6 err=fg:#f2777a,bgo:1,U fn=fg:#ac8d58 idm=U kw=fg:#ffeea6 lnum=bgo:0,fg:#777c85 mod=bgo:0.25,bg:#777c85 mtch=bgo:0.5,bg:#777c85,fgo:1 norm=bg:#2d2d2d,bgo:1,fg:#b3b9c5 num=fg:#fca369 op1=fg:#6ab0f3,fgo:1 op2=fg:#76d4d6 quad=fg:#f2777a sel=bg:#6ab0f3,bgo:0.25 semi=fg:#6ab0f3 sqbr=fg:#6ab0f3 srch=bg:#e1a6f2,bgo:0.25 str=fg:#92d192 tc=bg:#777c85,bgo:0.25 tcpe=bg:#777c85,bgo:0.25 zld=fg:#fca369 scmd=fg:#ffeea6 ucmd=fg:#ffeea6,B vtt=bg:#777c85,bgo:1 ca=bg:#777c85,bgo:0.25,fg:#f2777a cm=bg:#2d2d2d,bgo:1,fg:#92d192 cv=bg:#2d2d2d,bgo:1,fg:#ffeea6 cvv=bg:#2d2d2d,bgo:1,fg:#76d4d6 ma=bg:#777c85,bgo:0.25,fg:#76d4d6 na=bg:#44475a,bgo:1,fg:#bd93f9 qor=bg:#f2777a,bgo:1,fg:#ffffff dc=bg:#7a3b3d,bgo:1 lbl=fg:#ffd479 glb=fg:#f2777a dfn=fg:#ffffff qdl=fg:#b3b9c5 cur=fg:#ffffff,fgo:1 acsl=bgo:0.25,bg:#e1a6f2\"},{\"name\":\"Nord (1)\",\"theme\":\"dark\",\"styles\":\"com=fg:#616e88 diam=B,fg:#81a1c1 err=fg:#bf616a,bgo:0.5,U glb=fg:#ebcb8b kw=fg:#81a1c1 lnum=bgo:0,fg:#4c566a mod=bg:#434c5e,bgo:0.25 mtch=bg:#434c5e,bgo:0.5 norm=bg:#2e3440,bgo:1,fg:#eceff4 num=fg:#b48ead quad=fg:#ebcb8b srch=bg:#434c5e,bgo:0.5 str=fg:#a3be8c tc=bg:#434c5e,bgo:1,fg:#eceff4 tcpe=bg:#434c5e,bgo:1,fg:#eceff4 zld=fg:#b48ead vtt=bg:#434c5e dc=bg:#603136,bgo:1 cur=fg:#d8dee9 cubr=fg:#5e81ac asgn=fg:#88c0d0 lbl=fg:#81a1c1,B fn=fg:#81a1c1 qdl=fg:#d8dee9 var=fg:#d8dee9 sqbr=fg:#81a1c1 semi=fg:#81a1c1 idm=fg:#d08770 sel=bg:#434c5e,bgo:0.5 par=fg:#eceff4 scmd=fg:#81a1c1 ucmd=fg:#81a1c1 vtip=bg:#3b4252,fg:#eceff4,bgo:1 ca=fg:#bf616a,bg:#434c5e,bgo:1 cm=fg:#a3be8c,bg:#2e3440,bgo:1 cv=fg:#ebcb8b,bg:#2e3440 cvv=fg:#88c0d0,bg:#2e3440,bgo:1 ma=fg:#88c0d0,bg:#434c5e,bgo:1 na=fg:#b48ead,bg:#434c5e,bgo:1 qor=fg:#eceff4,bg:#bf616a,bgo:1 op1=fg:#88c0d0 op2=fg:#8fbcbb\"}]",
    "confirmations":"{\"SaveFileOptionsExtension:.apln\":100,\"SaveFileOptionsExtension:.dyalog\":100,\"\":100}",
    "ilf":"0",
    "indentOnOpen":"0",
    "kbdLocale":"en_GB",
    "keys":"{\"BK\":[\"Alt-Up\",\"Ctrl-Shift-Backspace\"],\"DK\":[\"Ctrl-Shift-D\"],\"DMK\":[\"Ctrl-Shift-K\"],\"FD\":[\"Alt-Down\",\"Ctrl-Shift-Enter\"],\"FX\":[\"Ctrl-S\"],\"QCP\":[\"Ctrl-Shift-P\"],\"ZM\":[\"Ctrl-Shift-Up\"],\"PF11\":[\"F11\"]}",
    "lbar":"0",
    "lbarOrder":"← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤⍥@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬  ",
    "menu":"# see below for syntax\n\nDyalog                          {mac}\n  About Dyalog             =ABT\n  -\n  Preferences...           =PRF\n  -                            \n  &Quit                    =QIT\n&File                           {!browser}\n  &Open...                 =OWS {local}\n  &New Session             =NEW\n  &Connect...              =CNC\n  -                             {!mac}\n  &Quit                    =QIT {!mac}\n&Edit\n  Undo                     =UND {!browser}\n  Redo                     =RDO {!browser}\n  -                             {!browser}\n  Cut                      =CT  {!browser}\n  Copy                     =CP  {!browser}\n  Paste                    =PT  {!browser}\n  Select All               =SA  {mac}\n  -                             {!mac&&!browser}\n  Find\n    &Find                    =SC\n    &Replace                 =RP\n  Preferences...           =PRF {!mac}\n&View\n  Show Language Bar        =LBR\n  Show Status Bar          =SBR\n  Show Workspace Explorer  =WSE\n  Show Debug               =DBG\n  Line Wrapping in Session =WRP\n  -                             {!browser}\n  Stops                    =TVB\n  Line Numbers             =LN\n  Outline                  =TVO\n  -                             {!browser}\n  Increase Font Size       =ZMI {!browser}\n  Decrease Font Size       =ZMO {!browser}\n  Reset Font Size          =ZMR {!browser}\n  -                             {!browser}\n  Toggle Full Screen            {!browser}\n&Window\n  Close All Windows        =CAW\n&Action\n  Edit                     =ED\n  Trace                    =TC\n  -\n  Clear all trace/stop/monitor =CAM\n  Weak Interrupt           =WI\n  Strong Interrupt         =SI\n&Threads                        {rp21}\n  Pause on Error           =POE\n  Pause all Threads        =PAT\n  Resume all Threads       =RSU\n  Restart all Threads      =MA\n&Help\n  Getting &Started         =https://dyalog.com/introduction.htm\n  -\n  Dyalog &Help             =DHI\n  &Language Elements       =LEL\n  &Documentation Centre    =DOX\n  -\n  Dyalog &Website          =https://dyalog.com/\n  &Email Dyalog            =EMD\n  -\n  Latest &Enhancements     =ENH\n  Read &Me                 =RME\n  &Third Party Licences    =TPL\n  &About                   =ABT {!mac}\n\n# Syntax:\n#   &x   access key, alt+x\n#   =CMD command code; some are special:\n#          LBR WRP WSE render as checkboxes\n#   =http://example.com/  open a URL\n#   {}   conditional display, a boolean expression\n#          operators: && || ! ( )\n#          variables: local browser mac win\n#   -    separator (when alone)\n#   #    comment\n\n# The =PRF (\"Preferences...\") menu item must be present.",
    "pfkeys":"[\"\",\"\",\"\",\"\",\"<LL>(<RL>)\",\"<DB>\",\"\",\"\",\"\",\"\",\"\",\"<LL>(<RL>)\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]",
    "prefixKey":"¬",
    "selectedExe":"C:\\Program Files\\Dyalog\\Dyalog APL-64 18.2 Unicode\\dyalog.exe",
    "zoom":"6",
    "editWins":"{\"width\":400,\"height\":600,\"x\":200,\"y\":200,\"ox\":0,\"oy\":0}",
    "indent":"-1",
    "indentMethods":"2",
    "squiggleTips":"1",
    "valueTips":"0",
    "editWinsRememberPos":"1"
  }

Interpreter:
  Version: 18.2.44968
  Platform: Windows-64
  Edition: Unicode/64
  Date: Dec 13 2021 at 21:22:17
abrudz commented 2 years ago

See #832