Editor: Script verifier jumps to wrong line when word wrapping affects the script

Issue Description

When clicking on a script issue the editor is supposed to jump to the corresponding line (maybe even position).The given line in the issue list is correct. But if word wrap is active the reference to the line is off when you click on the entry to jump to the position in the script (Ignore the typo please).

With word wrap:

Wordwrap_On

Without word wrap:

Wordwrap_Off

Steps to Reproduce

  1. Create a new script with this content:
Begin TestScript

short VarA

MessageBox "This is a test for a really long script line that really wants to be word wrapped. Please wrap this line until the error occurs."

if ( VarA = 1) 
	;Something happening here
Endif

End TestScript
  1. Play with the size of the subview until word wrap kicks in
  2. Click on the shown error it will jump to the wrong line and position
  3. Make it bigger so word wrap is not active anymore
  4. It will work as expected

System Information

  • OpenMW Version: 0.50 Stable
  • Operating System & Version: Windows 11
  • Morrowind Version: Steam
  • Language: English
  • Addons: Not relevant
Edited by YeOldeWizard