Community
    • Login

    Highlight modified text

    Scheduled Pinned Locked Moved General Discussion
    38 Posts 7 Posters 19.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Meta ChuhM
      Meta Chuh moderator @Alan Kilborn
      last edited by

      welcome to the notepad++ invariant mind helpdesk, @Alan-Kilborn

      I wish people’s opinions would stop changing my mind!

      solution: if they don’t have boobs, there’s no need to change your mind 😉

      AZJIO AZJIOA 1 Reply Last reply Reply Quote 1
      • AZJIO AZJIOA
        AZJIO AZJIO @Meta Chuh
        last edited by

        @Meta-Chuh
        If the author spoke about comparing the two files, the question would have sounded different. There are professional programs for this.
        If you cling to the words, the author would like to see the changes, looking through 1 file. Therefore, your interpretation also does not match the request.
        By the way, the way of marking lines can be done by highlighting the entire line.

        Alan KilbornA 1 Reply Last reply Reply Quote 0
        • Alan KilbornA
          Alan Kilborn @AZJIO AZJIO
          last edited by

          @AZJIO-AZJIO said:

          If the author spoke about comparing the two files

          I think it is up to interpretation…it could go either way. Unless the OP clarifies we will never know. Often an OP says one thing, and then when people answer, the OP comes back and says No I meant something totally different.

          the way of marking lines can be done by highlighting the entire line

          Yes, but that may get a little “heavy”. Maybe it could be an option…either a colored blob in a new margin (like LN) or a background color change for the entire line.

          EkopalypseE 1 Reply Last reply Reply Quote 1
          • EkopalypseE
            Ekopalypse @Alan Kilborn
            last edited by Ekopalypse

            @Alan-Kilborn

            here, first naive approach, something to play with
            There is already a disclaimer which, I assume, cannot be solved easily.
            I’ve tested to paste 100 000 lines - which took, on my machine, ~2 seconds
            saving those changes does also take ~2 seconds but deleting it took ~10 seconds.
            LN seems to suffer from the same problem and has nearly the same performance by the way.
            So, this script is only useful on normal text editing actions but NOT for huge change sets.

            Script includes two sets of markers just to show how this could be changed.
            Marker image is of 14x14 pixel and each pixel is represented by 4 bytes (rgba).
            Tip, color the \x00 instances and the symbol is visible :-)

            from Npp import editor, MARGINTYPE, MODIFICATIONFLAGS
            
            # marker symbols
            # change_marker = '''\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF9\xA6\x72\xFF\xFA\xA7\x73\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF7\xA4\x70\xFF\xF8\xB6\x8B\xFF\xF8\xA5\x71\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF5\xA2\x6E\xFF\xFE\xCA\xA8\xFF\xF4\xB3\x87\xFF\xF6\xA3\x6F\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF3\xA0\x6C\xFF\xF6\xC5\xA2\xFF\xF6\xC6\xA2\xFF\xF0\xB0\x83\xFF\xF4\xA1\x6D\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF1\x9E\x6A\xFF\xFD\xC1\x9B\xFF\xFE\xC1\x9C\xFF\xF0\xC2\x9D\xFF\xFD\xAE\x81\xFF\xF3\xA0\x6C\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEF\x9C\x68\xFF\xF5\xBC\x95\xFF\xF6\xBD\x95\xFF\xF8\xBE\x97\xFF\xFB\xBF\x99\xFF\xFB\xAD\x7F\xFF\xF1\x9E\x6A\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xED\x9A\x66\xFF\xFD\xB8\x8E\xFF\xFE\xB8\x8F\xFF\xF0\xB9\x90\xFF\xF4\xBB\x93\xFF\xF9\xBE\x97\xFF\xF9\xAB\x7D\xFF\xFF\x9C\x68\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEC\x99\x65\xFF\xF4\xB3\x87\xFF\xF6\xB4\x88\xFF\xF8\xB5\x8A\xFF\xFD\xB8\x8E\xFF\xF2\xBA\x92\xFF\xF1\xA6\x76\xFF\xFD\x9A\x66\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEA\x97\x63\xFF\xFC\xAE\x80\xFF\xFE\xAF\x82\xFF\xF1\xB1\x84\xFF\xF7\xB4\x89\xFF\xFC\xA3\x72\xFF\xFB\x98\x64\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE8\x95\x61\xFF\xF4\xAA\x7A\xFF\xF6\xAB\x7C\xFF\xFB\xAE\x80\xFF\xF6\x9F\x6D\xFF\xF9\x96\x62\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE6\x93\x5F\xFF\xFC\xA5\x73\xFF\xFF\xA7\x76\xFF\xF1\x9B\x68\xFF\xF7\x94\x60\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE4\x91\x5D\xFF\xF4\xA1\x6D\xFF\xFC\x97\x64\xFF\xF5\x92\x5E\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE2\x8F\x5B\xFF\xFA\x96\x63\xFF\xF2\x8F\x5B\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE0\x8D\x59\xFF\xF0\x8D\x59\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'''
            
            change_marker = '''\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF9\xA6\x72\xFF\xF9\xA6\x72\xFF\xF9\xA6\x72\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF7\xA4\x70\xFF\xF7\xA4\x70\xFF\xF7\xA4\x70\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF5\xA2\x6E\xFF\xF5\xA2\x6E\xFF\xF5\xA2\x6E\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF3\xA0\x6C\xFF\xF3\xA0\x6C\xFF\xF3\xA0\x6C\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF1\x9E\x6A\xFF\xF1\x9E\x6A\xFF\xF1\x9E\x6A\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEF\x9C\x68\xFF\xEF\x9C\x68\xFF\xEF\x9C\x68\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xED\x9A\x66\xFF\xED\x9A\x66\xFF\xED\x9A\x66\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEC\x99\x65\xFF\xEC\x99\x65\xFF\xEC\x99\x65\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEA\x97\x63\xFF\xEA\x97\x63\xFF\xEA\x97\x63\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE8\x95\x61\xFF\xE8\x95\x61\xFF\xE8\x95\x61\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE6\x93\x5F\xFF\xE6\x93\x5F\xFF\xE6\x93\x5F\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE4\x91\x5D\xFF\xE4\x91\x5D\xFF\xE4\x91\x5D\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE2\x8F\x5B\xFF\xE2\x8F\x5B\xFF\xE2\x8F\x5B\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE0\x8D\x59\xFF\xE0\x8D\x59\xFF\xE0\x8D\x59\xFF\x00\x00\x00\x00\x00\x00\x00\x00'''
            
            
            # save_marker = '''\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\xA6\x72\xFF\x1A\xA7\x73\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\xA4\x70\xFF\x18\xB6\x8B\xFF\x18\xA5\x71\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\xA2\x6E\xFF\x1E\xCA\xA8\xFF\x14\xB3\x87\xFF\x16\xA3\x6F\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\xA0\x6C\xFF\x16\xC5\xA2\xFF\x16\xC6\xA2\xFF\x10\xB0\x83\xFF\x14\xA1\x6D\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x9E\x6A\xFF\x1D\xC1\x9B\xFF\x1E\xC1\x9C\xFF\x10\xC2\x9D\xFF\x1D\xAE\x81\xFF\x13\xA0\x6C\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0F\x9C\x68\xFF\x15\xBC\x95\xFF\x16\xBD\x95\xFF\x18\xBE\x97\xFF\x1B\xBF\x99\xFF\x1B\xAD\x7F\xFF\x11\x9E\x6A\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0D\x9A\x66\xFF\x1D\xB8\x8E\xFF\x1E\xB8\x8F\xFF\x10\xB9\x90\xFF\x14\xBB\x93\xFF\x19\xBE\x97\xFF\x19\xAB\x7D\xFF\x1F\x9C\x68\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0C\x99\x65\xFF\x14\xB3\x87\xFF\x16\xB4\x88\xFF\x18\xB5\x8A\xFF\x1D\xB8\x8E\xFF\x12\xBA\x92\xFF\x11\xA6\x76\xFF\x1D\x9A\x66\xFF\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0A\x97\x63\xFF\x1C\xAE\x80\xFF\x1E\xAF\x82\xFF\x11\xB1\x84\xFF\x17\xB4\x89\xFF\x1C\xA3\x72\xFF\x1B\x98\x64\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x95\x61\xFF\x14\xAA\x7A\xFF\x16\xAB\x7C\xFF\x1B\xAE\x80\xFF\x16\x9F\x6D\xFF\x19\x96\x62\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x93\x5F\xFF\x1C\xA5\x73\xFF\x1F\xA7\x76\xFF\x11\x9B\x68\xFF\x17\x94\x60\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x91\x5D\xFF\x14\xA1\x6D\xFF\x1C\x97\x64\xFF\x15\x92\x5E\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x8F\x5B\xFF\x1A\x96\x63\xFF\x12\x8F\x5B\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            # \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8D\x59\xFF\x10\x8D\x59\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'''
            
            save_marker = '''\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\xA6\x72\xFF\x19\xA6\x72\xFF\x19\xA6\x72\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\xA4\x70\xFF\x17\xA4\x70\xFF\x17\xA4\x70\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\xA2\x6E\xFF\x15\xA2\x6E\xFF\x15\xA2\x6E\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\xA0\x6C\xFF\x13\xA0\x6C\xFF\x13\xA0\x6C\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x9E\x6A\xFF\x11\x9E\x6A\xFF\x11\x9E\x6A\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0F\x9C\x68\xFF\x0F\x9C\x68\xFF\x0F\x9C\x68\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0D\x9A\x66\xFF\x0D\x9A\x66\xFF\x0D\x9A\x66\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0C\x99\x65\xFF\x0C\x99\x65\xFF\x0C\x99\x65\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0A\x97\x63\xFF\x0A\x97\x63\xFF\x0A\x97\x63\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x95\x61\xFF\x08\x95\x61\xFF\x08\x95\x61\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x93\x5F\xFF\x06\x93\x5F\xFF\x06\x93\x5F\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x91\x5D\xFF\x04\x91\x5D\xFF\x04\x91\x5D\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x8F\x5B\xFF\x02\x8F\x5B\xFF\x02\x8F\x5B\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
            \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8D\x59\xFF\x00\x8D\x59\xFF\x00\x8D\x59\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'''
            
            
            MARKER_CHANGE = 15
            MARKER_CHANGE_MASK = 1<<MARKER_CHANGE
            MARKER_SAVED = 14
            MARKER_SAVED_MASK = 1<<MARKER_SAVED
            
            def setup():
                editor1.rGBAImageSetWidth(14)
                editor1.rGBAImageSetHeight(14)
                editor1.markerDefineRGBAImage(MARKER_CHANGE, change_marker)
                editor1.markerDefineRGBAImage(MARKER_SAVED, save_marker)
                editor1.setMarginTypeN(3, MARGINTYPE.SYMBOL)
                editor1.setMarginWidthN(3, 16)
                editor1.setMarginMaskN(3, MARKER_CHANGE_MASK | MARKER_SAVED_MASK)
                editor2.rGBAImageSetWidth(14)
                editor2.rGBAImageSetHeight(14)
                editor2.markerDefineRGBAImage(MARKER_CHANGE, change_marker)
                editor2.markerDefineRGBAImage(MARKER_SAVED, save_marker)
                editor2.setMarginTypeN(3, MARGINTYPE.SYMBOL)
                editor2.setMarginWidthN(3, 16)
                editor2.setMarginMaskN(3, MARKER_CHANGE_MASK | MARKER_SAVED_MASK)
            
            
            def locnav_filesaved(args):
                marker_line = editor.markerNext(0, MARKER_CHANGE_MASK)
                while marker_line >= 0:
                    editor.markerDelete(marker_line, MARKER_CHANGE)
                    if editor.markerGet(marker_line) & MARKER_SAVED_MASK == 0:
                        editor.markerAdd(marker_line, MARKER_SAVED)
                    marker_line = editor.markerNext(marker_line, MARKER_CHANGE_MASK)
            
            
            def locnav_modified(args):
                current_line = editor.lineFromPosition(args['position'])
                current_marker_mask = editor.markerGet(current_line)
                lines_added = args['linesAdded']
                length = args['length']
             
                if lines_added == 0:
                    if current_marker_mask & MARKER_CHANGE_MASK:
                        return
                    if current_marker_mask & MARKER_SAVED_MASK:
                        editor.markerDelete(current_line, MARKER_SAVED)
                    editor.markerAdd(current_line, MARKER_CHANGE)
                elif lines_added > 0:
                    last_line = editor.lineFromPosition(args['position'] + length)
                    for i in range(current_line, last_line+1):
                        editor.markerAdd(i, MARKER_CHANGE)
            
                else:  # delete multiple lines
                    pass
             
            
            setup()
            notepad.callback(locnav_filesaved, [NOTIFICATION.FILESAVED])
            editor.callbackSync(locnav_modified, [SCINTILLANOTIFICATION.MODIFIED])
            
            
            Alan KilbornA 1 Reply Last reply Reply Quote 2
            • Alan KilbornA
              Alan Kilborn @Ekopalypse
              last edited by Alan Kilborn

              @Ekopalypse said:

              So, this script is only useful on normal text editing actions but NOT for huge change sets.

              It’s OK. That’s really only where it is useful anyway. :)

              I gave it a brief go, it seemed to hang N++ when I saved, probably some interaction with something else (not LN–I disabled that first) I’ve got running. Will give it a deeper look when I get a chance…

              Thanks for taking on this task! :)

              EkopalypseE 1 Reply Last reply Reply Quote 2
              • EkopalypseE
                Ekopalypse @Alan Kilborn
                last edited by

                @Alan-Kilborn

                it seemed to hang N++ when I saved …

                happened to me as well one time - interesting, so it must be the script - thought it might
                be me doing registering callback, deleting callback … over and over for testing
                Did you do something similar perhaps?

                Btw. I’m currently trying to figure out how one could easily assign a shortcut from script

                shortcut_dict = {}
                
                def register_shortcut(shortcut):
                    def decorator(function):
                        if shortcut not in shortcut_dict:
                            shortcut_dict[shortcut] = function
                            print 'shortcut', shortcut, 'assigned to', function.__name__
                        else:
                            print 'shortcut {} already assigned to funtion {}'.format(shortcut, shortcut_dict[shortcut])
                    return decorator
                
                
                # important to note that this function cannot be called from within the script
                @register_shortcut('CTRL+-')
                def test():
                    print 'test_it'
                    
                # test()  <--- that does not work
                

                run this the first time, then comment the shortcut_dict = {} line and run it a second time. Finally call shortcut_dict['CTRL+-']() from the console

                The only thing left is to hook the scintilla hwnd :-)

                Alan KilbornA 1 Reply Last reply Reply Quote 1
                • Alan KilbornA
                  Alan Kilborn @Ekopalypse
                  last edited by Alan Kilborn

                  @Ekopalypse said:

                  Did you do something similar perhaps?

                  No, but I have a lot of other cute scripts running, will have to dig in and disable some for this testing.

                  run this the first time, then comment the shortcut_dict = {} line and run it a second time

                  why not?:

                  try:
                      shortcut_dict
                  except NameError:
                      shortcut_dict = {}
                  
                  EkopalypseE 1 Reply Last reply Reply Quote 1
                  • EkopalypseE
                    Ekopalypse @Alan Kilborn
                    last edited by Ekopalypse

                    @Alan-Kilborn

                    why not …

                    LOL because my brain doesn’t work like that :-D
                    First I type something and then if it works I try to optimize it,
                    but have posted it before even thinking about doing it properly :-D

                    Alan KilbornA 1 Reply Last reply Reply Quote 1
                    • Alan KilbornA
                      Alan Kilborn @Ekopalypse
                      last edited by Alan Kilborn

                      @Ekopalypse said:

                      The only thing left is to hook the scintilla hwnd

                      Yes, but there are some caveats. I tried this kind of thing before. If same shortcut is already mapped in Shortcut Mapper, you won’t see it. Not sure if this matters to you, could be a point of confusion for your users (as you now seem to be publishing! :) )

                      BTW, this thread is now officially deemed hijaaked, not once but now twice.

                      EkopalypseE 1 Reply Last reply Reply Quote 2
                      • EkopalypseE
                        Ekopalypse @Alan Kilborn
                        last edited by

                        @Alan-Kilborn

                        If same shortcut is already mapped in Shortcut Mapper

                        I would argue if you register a shortcut within a script you know that you did it?
                        But you are right - might be a area of confusion - hmm …

                        I guess, once I have something useful I will open a different thread :-)

                        Alan KilbornA 1 Reply Last reply Reply Quote 1
                        • Alan KilbornA
                          Alan Kilborn @Ekopalypse
                          last edited by

                          @Ekopalypse said:

                          I would argue if you register a shortcut within a script you know that you did it?

                          People tend to just run scripts, forgetting the details… :(

                          And, BTW, I HATE plugins (and maybe in the future, scripts!) that hijaak keycombos I’m possibly already using. Ugh. Better to leave them unassigned and let ME decide which functions need them, and then what they should be.

                          EkopalypseE 1 Reply Last reply Reply Quote 1
                          • EkopalypseE
                            Ekopalypse @Alan Kilborn
                            last edited by

                            @Alan-Kilborn

                            Better to leave them unassigned and let ME decide which functions need them, and then what they should be.

                            Agreed, I assume that something like

                            PREVIOUS_CHANGE = None  # replace None with e.g. CTRL+- to assign a shortcut
                            @register_shortcut(PREVIOUS_CHANGE)
                            

                            and checking in register_shortcut for None would be ok.

                            1 Reply Last reply Reply Quote 2
                            • guy038G
                              guy038
                              last edited by guy038

                              Hi, @ekopalypse,

                              I saw the the @alan-kilborn suggestion and your proposition to remove the old @eko-palypse account. Of course, I can delete a post, move a specific post from a topic to an other topic and, even, delete an acount, but I don’t think I have any possibility to modify the acoount owner of a specific post :-((

                              Quite logical : would it be any interest to attribute a post, written by a member to an other member !

                              On the other hand, it would not be sensible to disconnect your replies to some posts, made with your old acoount, from the other posts, on a particular topic, wouldn’t it ? Indeed, as anyone else, your replies depends on the context of the precedent posts, on a specific topic, and are still valuable ;-))


                              Just for information, with the old @eko-palypse account, you have written 283 posts, covering 109 topics. The most recent one was on 02/17/2019 and the older one was on 11/22:2019.

                              If you don’t mind, I may post the list of the 283 links to posts, on this site or, if you prefer, send it by e-mail. Just tell me about it !

                              Best Regards,

                              guy038

                              Meta ChuhM 1 Reply Last reply Reply Quote 4
                              • Meta ChuhM
                                Meta Chuh moderator @guy038
                                last edited by Meta Chuh

                                hi @guy038 @Alan-Kilborn @Ekopalypse et al.

                                i agree with @guy038 and also think it is best to leave eko’s accounts like they are, as it would otherwise break the continuity and the whole history what happened and what lead to the dual-account.
                                and changing the old user account name would also break all reply address references to that account (everything directly addressed to @Eko-palypse) for all past posts.

                                who knows, maybe @Ekopalypse gets his old account back one day, and wants to start a discussion with himself ? 😂

                                and @Alan-Kilborn if you’d need a memory hook to remember @Ekopalypse 's new account, you could use the following:
                                “@Ekopalypse is continuously present, so his name is continuously written”
                                but i guess after all these posts, plus @Ekopalypse 's 100 plus post-topics, you won’t need any hook on that anymore. 😉

                                Alan KilbornA 1 Reply Last reply Reply Quote 3
                                • Alan KilbornA
                                  Alan Kilborn @Meta Chuh
                                  last edited by

                                  All,

                                  To be fair (to me!), I did retract my original suggestion about Eko’s duality.

                                  1 Reply Last reply Reply Quote 3
                                  • AZJIO AZJIOA
                                    AZJIO AZJIO
                                    last edited by

                                    I recently made my own version of the plugin, because LocationNavigate had unnecessary features. But I’m not sure that I did it right. I looked at the LocationNavigate code and did not understand anything. Therefore, if someone has a problem with LocationNavigate, then try mine. I used to use NppPlugin_ChangeMarker, but he had a problem, he crashed the program while saving the file after an hour of work.
                                    On my system, LocationNavigate is working fine. I set such parameters so that he does not save the history of jumps.

                                    my plugin https://yadi.sk/d/IQD33JVWbtwQXw

                                    1 Reply Last reply Reply Quote 0
                                    • EkopalypseE
                                      Ekopalypse
                                      last edited by

                                      I haven’t thought about the old post and that it might generate trouble, therefore, better
                                      just leave it as it is and don’t worry about it anymore.

                                      Thx for all insights and tips. :-)

                                      1 Reply Last reply Reply Quote 2
                                      • Alan KilbornA Alan Kilborn referenced this topic on
                                      • First post
                                        Last post
                                      The Community of users of the Notepad++ text editor.
                                      Powered by NodeBB | Contributors