Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


sticky selection

1 2 > >> (Page 1 of 2)
  • If I select a tag and contents using the shortcut or the menu command, then try to use the arrow keys to move the cursor, it changes the selection rather than deselecting it. Almost as though shift is still pressed, even though it isn't.

    I know it never used to do this - is it a bug or a feature? :p

  • Hi,

    I just noticed it doing this too; it looks like a new version of Notepad++ causes this change of behaviour, since I haven’t done anything with the plugin.  Apparently Notepad++ isn’t reverting to normal selection mode for some reason.

    I’ll see if I can find a way to prevent it doing this.


  • I had a look through the Scintilla commands and plugin commands and found nothing to fix it. However, pressing Escape (SCI_CANCEL) does fix it. It leaves the selection as is, but pressing an arrow key deletes the selection as it should.

  • Superb, nice one :D

  • Hm… On my work computer, the fix doesn’t seem to help… :-(

    I’ll have to test more extensively when I have the time; next Sunday perhaps.  In the meantime, press ESC as a workaround. :-)

  • It worked on my laptop, I'll try it on my work compuper now. Although when I closed NPP on my laptop, it did come up with an Access violation of some kind… I'll see if the same happens on my work compuper, watch this space…

  • Ok it made no difference to my work computer :( I got no access violation when closing though…

  • What version of Notepad++ are you using on your different computers?

  • Work: 5.8.3 unicode
    Laptop: 5.6 unicode (I really should update)
    Home: 5.7 unicode

    Your latest version only fixed the issue on my laptop, not my work or home computers

  • Hm… I rather think that the problem never even occurred in version 5.6 (on your laptop).

    The weird thing is that the three options 'Find matching tag', 'Select tag and contents', and 'Select tag contents only' use exactly the same code to select the text, yet only the latter two stick Np++ in selection mode.

    I suspect something changed in the highlighting code of Notepad++ (or Scintilla itself) between versions 5.6 and 5.7…

  • It's possible it was fine on my laptop, I rarely use it for work purposes.

    I'm not sure how scintilla works at all, but could you not "call" or invoke SCI_CANCEL after it's selected? Or is that what you did in the latest update?

    Another suggestion while I'm here, the Select Tag Contents Only option, could that trim before selecting? So if I've got

    Could it only select the inner div(s) rather than the whitespace around them do you think?

  • Yes, the last version did exactly that: select the text, then send a SCI_CANCEL.  To no avail.

    But I’ve found a better solution: I was using the SCI_SETSEL message, and nowadays there’s also a SCI_SETSELECTION, which is supposed to do the same thing.  When I use that, the problem doesn’t seem to occur.  Go figure!
    Only I can’t find out in what version of Scintilla that message was introduced, and hence in what version of Notepad++ it will work.  I’ll probably have the plugin use that for notepad++ version 5.7 and up.

    Re: not selecting the extra whitespace, that should be feasible.

    I’ll try to have a new version with the bugfix above and this feature published tomorrow.

  • Excellent, good work! I'll give it a try at work tomorrow, and I'll update NPP on both my laptop and my home computer ;)

  • Ok that seems to work :) However, now I get an error whenever I close NPP…

    I'm running Windows 7 if that helps

  • Dang!  And it works fine on my own PCs…  At home, I’m running Windows 7 on 32 bits; at work, Windows 7 on 64 bits.

    Does it matter if you change the Plugins\Config\HTMLTag.ini as follows:

  • Just tried that on my laptop, same error with True and False, both cause the error :(

  • I’ve put up a debug version on http://martijn.coppoolse.com/software/download/HTMLTag_0.3.543_debug.zip.
    Could you try that one, and send me the resulting log file (plugins\notepad++-HTMLTag_unicode.log) after closing Notepad++?  Perhaps that way I can figure out what's going wrong.

    The log file quickly becomes very large — opening Notepad++, clicking somewhere, and then doing  already results in a 3 MB file — so you might want to zip it before sending it… :-\

  • I'll give that a try at work tomorrow. I just tried your latest release (not the debug one) on the latest version of NPP on Windows Vista and it's fine, the fix worked, and there is no error on closing…

    I'll reply again tomorrow once I've tested it on Win 7

  • Hi Hughie,

    Did you manage to test it, and if so, did it work?

  • I don't get any closing errors on it at work, but I still get them on my laptop. I'll update everything on my laptop (NPP and htmlTag) and see if I still get the error, if I do, I'll run that test and get back to you.

    I do apologise, it was working on my work PC so I had completely forgotten!

  • Still getting the error on my laptop: http://www.yesthiswebsiteexists.com/npp_htmltag.log

    Windows 7 32bit
    NPP 5.8.3
    HTMLTag 0.3.543

    I get no errors on my work PC:

    Windows 7 64 bit
    NPP 5.8.3
    HTMLTag 0.3.543

  • stupid_angel

    well, after using a debug version I get this:
    'Unknown exception' window. is it all right?

  • No worries, you’re under no obligation to help, though I’m glad if you do, of course.  :-)

    The file you posted is the entire log?  I expected more — the error doesn’t seem to show up in there… :-(
    But I’ll look into it when I get home.

    @labus24: The debug version is not intended for regular use.
    Do you also get the 'Unknown exception' when using the regular version (https://sourceforge.net/projects/npp-plugins/files/HTMLTag/HTMLTag%20plugin%20v0.3.2/)?

1 2 > >> (Page 1 of 2)