• Login
Community
  • Login

Easier Rollback for edits

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
18 Posts 5 Posters 904 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.
  • M
    Moon Watcher
    last edited by Dec 19, 2019, 5:24 AM

    Thanks a lot for the suggestion. I tried it out but it didn’t behave as expected or desired. The text was highlighted making it very difficult to read in my current color preferences (white text, black background). I wish it was more discreet and less intrusive. I fooled around with the various options but couldn’t get them to work properly (32-bit problem?). Maybe I’ll dredge up one of my old text editors and see if it has something similar or more functional.

    E 1 Reply Last reply Dec 19, 2019, 12:24 PM Reply Quote 0
    • E
      Ekopalypse @Moon Watcher
      last edited by Dec 19, 2019, 12:24 PM

      @Moon-Watcher

      Sorry if this sounds harsh, but you are basically saying that clicking the MarkColor and choosing a color which fits your need is too complicated?

      3a320af5-1c16-4a03-b532-57e481f5fbd5-image.png

      M 1 Reply Last reply Dec 20, 2019, 5:22 AM Reply Quote 0
      • A
        Alan Kilborn
        last edited by Dec 19, 2019, 12:30 PM

        @Moon-Watcher said in Easier Rollback for edits:

        automatically identified in some way (different color, line tokens, etc.)

        The text was highlighted making it very difficult to read

        My earlier comment was clearly in regards to “line tokens”, which is much less intrusive than changed colors on every bit of changed text. That would be too “heavy” for me, and apparently is for the OP as well. Perhaps the OP didn’t consider that possibility before asking, and even the slightest color change, if reconfigured from the default, would be too much (I know it would be for me).

        1 Reply Last reply Reply Quote 1
        • A
          andrecool-68
          last edited by Dec 19, 2019, 1:54 PM

          For me, Notepad ++ crashes a lot because of the Location Navigate plugin

          A 1 Reply Last reply Dec 19, 2019, 2:36 PM Reply Quote 2
          • A
            Alan Kilborn @andrecool-68
            last edited by Dec 19, 2019, 2:36 PM

            @andrecool-68 said in Easier Rollback for edits:

            Notepad ++ crashes a lot because of the Location Navigate

            Yes, I’ve heard of this. Obviously I’m in the camp where it doesn’t crash. Maybe it works for 50% of people? I don’t know; no real data.

            It’s sort of like the Hex Editor plugin; works for some (50%?). For me, Hex Editor crashes.

            But I’d rather have Location Navigate than Hex Editor (I can obtain a hex editor outside of Notepad++). But someday, perhaps, LN’s change marks will be an integral feature of Scintilla and will work for everyone. The other features of LN, indeed its primary features, aren’t really Scintilla-related, but are more Notepad++ -related, so there would actually be some substantial N++ code work to be done to support that.

            Note: I’m just random rambling…

            1 Reply Last reply Reply Quote 3
            • M
              Michael Vincent
              last edited by Dec 19, 2019, 3:32 PM

              @Alan-Kilborn said in Easier Rollback for edits:

              Note: I’m just random rambling…

              Good ideas though. Hex Editor works fine for me the few times I actually use it, but like you said, I too would rather have LocationNavigate working (x64 too by the way) than Hex Editor.

              I looked at Location Navigate code and was trying to port it to x64 and it loads fine for me and does the changes but when I save it crashes. Even with the original on 32-bit, it seems to run fine and do everything as advertised, but when I close N++, I get a Windows error popup saying the application crashed. Disabling Location Navigate plugin fixes the error.

              I created a little NppExec script show how Location Navigate does its markings:

              NPP_CONSOLE keep
              SET LOCAL MARKTYPE = change
              
              IF "$(ARGC)"=="0" THEN
                  INPUTBOX "Choice of:  change, save, clear" : "Choice" :
                  IF "{$(INPUT)}"=="{}" GOTO END
                  ENDIF
                  SET LOCAL MARKTYPE = $(INPUT)
              ENDIF
              IF "$(ARGC)">="2" THEN
                  SET LOCAL MARKTYPE = $(ARGV[1])
              ENDIF
              
              SCI_SENDMSG SCI_SETMARGINTYPEN 4 SC_MARGIN_SYMBOL
              //SCI_SENDMSG SCI_SETMARGINTYPEN 10 SC_MARGIN_SYMBOL
              //SCI_SENDMSG SCI_SETMARGINTYPEN 11 SC_MARGIN_SYMBOL
              SCI_SENDMSG SCI_SETMARGINWIDTHN 4 4
              SCI_SENDMSG SCI_SETMARGINMASKN 4 3072
              
              SCI_SENDMSG SCI_MARKERSETFORE 10 8831743
              SCI_SENDMSG SCI_MARKERSETFORE 11 11927477
              SCI_SENDMSG SCI_MARKERSETBACK 10 8831743
              SCI_SENDMSG SCI_MARKERSETBACK 11 11927477
              SCI_SENDMSG SCI_MARKERDEFINE 10 SC_MARK_FULLRECT
              SCI_SENDMSG SCI_MARKERDEFINE 11 SC_MARK_FULLRECT
              
              IF "$(MARKTYPE)"~="change" THEN
                  SCI_SENDMSG SCI_MARKERDELETE $(CURRENT_LINE) 11
                  SCI_SENDMSG SCI_MARKERADD $(CURRENT_LINE) 10
              ELSE IF "$(MARKTYPE)"~="save" THEN
                  SCI_SENDMSG SCI_MARKERDELETE $(CURRENT_LINE) 10
                  SCI_SENDMSG SCI_MARKERADD $(CURRENT_LINE) 11
              ELSE IF "$(MARKTYPE)"~="clear" THEN
                  SCI_SENDMSG SCI_MARKERDELETE $(CURRENT_LINE) 10
                  SCI_SENDMSG SCI_MARKERDELETE $(CURRENT_LINE) 11
              ELSE IF "$(MARKTYPE)"~="off" THEN
                  SCI_SENDMSG SCI_MARKERDELETE $(CURRENT_LINE) 10
                  SCI_SENDMSG SCI_MARKERDELETE $(CURRENT_LINE) 11
                  SCI_SENDMSG SCI_SETMARGINTYPEN 4 0
                  SCI_SENDMSG SCI_SETMARGINWIDTHN 4 0
              ENDIF
              
              :END
              

              Of course this only demonstrates manually, it doesn’t actually track changes the way the Location Navigate plugin does automatically.

              Cheers.

              A 1 Reply Last reply Dec 19, 2019, 4:18 PM Reply Quote 2
              • A
                Alan Kilborn @Michael Vincent
                last edited by Alan Kilborn Dec 19, 2019, 4:19 PM Dec 19, 2019, 4:18 PM

                @Michael-Vincent said in Easier Rollback for edits:

                trying to port it to x64 … but when I save it crashes

                I like what you’re trying to do! I presume you’ve run under the debugger, set some “strategic” (i.e., guesses at where to locate) breakpoints, and single-stepped to maybe isolate the cause of the crash?

                Location Navigate and Explorer plugins might be the only things keeping me in N++ 32-bit land.

                M 1 Reply Last reply Dec 19, 2019, 7:32 PM Reply Quote 1
                • M
                  Michael Vincent @Alan Kilborn
                  last edited by Michael Vincent Dec 19, 2019, 7:33 PM Dec 19, 2019, 7:32 PM

                  @Alan-Kilborn

                  I have not run in debugger - I’m not that talented a C++ programmer. If you are and want to look:
                  https://github.com/vinsworldcom/nppLocationNavigate

                  For Explorer on N++ 64-bit, I use:
                  https://github.com/funap/npp-explorer-plugin

                  I like it better than the one in Plugin Admin:
                  https://github.com/oviradoi/npp-explorer-plugin

                  A 1 Reply Last reply Dec 19, 2019, 8:14 PM Reply Quote 1
                  • A
                    andrecool-68 @Michael Vincent
                    last edited by Dec 19, 2019, 8:14 PM

                    @Michael-Vincent This is the way it should be so many warnings … or did I do something wrong?

                        1>------ Build started: Project: LocationNavigate, Configuration: Release x64 ------
                        1>LNhistoryDlg.cpp
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.h(136): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.h(140): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.cpp(69): warning C4267: 'initializing': conversion from 'size_t' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.cpp(76): warning C4244: 'initializing': conversion from 'LRESULT' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.cpp(94): warning C4244: 'initializing': conversion from 'LRESULT' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.cpp(99): warning C4244: 'initializing': conversion from 'LRESULT' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.cpp(102): warning C4244: 'initializing': conversion from 'LRESULT' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.cpp(228): warning C4267: '=': conversion from 'size_t' to 'long', possible loss of data
                        1>SelfCtrl.cpp
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\selfctrl.cpp(119): warning C4244: 'initializing': conversion from 'LONG_PTR' to 'DWORD', possible loss of data
                        1>StaticDialog.cpp
                        1>LocationNavigate.cpp
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.h(136): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.h(140): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(103): warning C4244: 'initializing': conversion from 'LRESULT' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(227): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(236): warning C4267: 'initializing': conversion from 'size_t' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(251): warning C4267: 'initializing': conversion from 'size_t' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(284): warning C4267: '=': conversion from 'size_t' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(301): warning C4244: '=': conversion from 'LRESULT' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(316): warning C4267: 'initializing': conversion from 'size_t' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(416): warning C4244: 'initializing': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(447): warning C4100: 'lpParam': unreferenced formal parameter
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(526): warning C4244: 'initializing': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(528): warning C4244: '=': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(543): warning C4244: '=': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(583): warning C4244: '=': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(664): warning C4244: 'initializing': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(676): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(730): warning C4244: 'initializing': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(763): warning C4100: 'lpReserved': unreferenced formal parameter
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1035): warning C4267: '=': conversion from 'size_t' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1068): warning C4244: '=': conversion from 'uptr_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1117): warning C4244: 'initializing': conversion from 'LRESULT' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1172): warning C4244: '=': conversion from 'uptr_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1246): warning C4244: '=': conversion from 'Sci_Position' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1247): warning C4244: '=': conversion from 'Sci_Position' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1253): warning C4244: '=': conversion from 'Sci_Position' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1254): warning C4244: '=': conversion from 'Sci_Position' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1282): warning C4311: 'type cast': pointer truncation from 'HWND' to 'int'
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1282): warning C4302: 'type cast': truncation from 'HWND' to 'int'
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1325): warning C4244: '=': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1332): warning C4244: '=': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1333): warning C4244: 'argument': conversion from 'Sci_Position' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1339): warning C4244: '=': conversion from 'Sci_Position' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1345): warning C4244: 'initializing': conversion from 'LRESULT' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1347): warning C4244: 'argument': conversion from 'Sci_Position' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1378): warning C4100: 'lParam': unreferenced formal parameter
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1378): warning C4100: 'wParam': unreferenced formal parameter
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\locationnavigate.cpp(1377): warning C4100: 'Message': unreferenced formal parameter
                        1>PluginDefinition.cpp
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.h(136): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\dockingfeature\lnhistorydlg.h(140): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\plugindefinition.cpp(339): warning C4267: '=': conversion from 'size_t' to 'long', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\plugindefinition.cpp(355): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
                        1>c:\users\uzzer\desktop\npplocationnavigate-master\plugindefinition.cpp(396): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
                        1>   Creating library LocationNavigate.lib and object LocationNavigate.exp
                        1>Generating code
                        1>All 386 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
                        1>Finished generating code
                        1>LocationNavigate.vcxproj -> C:\Users\Uzzer\Desktop\nppLocationNavigate-master\.\bin64\LocationNavigate.dll
                        1>Done building project "LocationNavigate.vcxproj".
                        ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
                    
                    M 1 Reply Last reply Dec 19, 2019, 11:33 PM Reply Quote 0
                    • M
                      Michael Vincent @andrecool-68
                      last edited by Dec 19, 2019, 11:33 PM

                      @andrecool-68
                      They need to be fixed. That’s all 32-bit fine but 64-bit broke as I understand it.

                      1 Reply Last reply Reply Quote 0
                      • A
                        Alan Kilborn
                        last edited by Dec 20, 2019, 12:26 AM

                        I meant to reply with this much earlier in the chain, for those that might not know the capability Location Navigate supplies as far as marking changed lines goes:

                        78d1e63c-5ebf-471c-b3a1-b2178fb0fd1a-image.png

                        1 Reply Last reply Reply Quote 1
                        • M
                          Moon Watcher @Ekopalypse
                          last edited by Dec 20, 2019, 5:22 AM

                          @Ekopalypse Not at all. My point was that I found the highlighting of the text too distracting. However thanks to you and @Alan-Kilborn posting those pictures I found the options menu I hadn’t seen before. Wow! This is EXACTLY what I was looking for! Actually, it’s even better. I’ve been using notepad++ for 9 years and this plug-in will save me hundreds of hours of trouble-shooting.

                          Thanks to everyone who responded to my query. It’s really fantastic how helpful everyone is in this forum.

                          1 Reply Last reply Reply Quote 2
                          • M
                            Moon Watcher @Michael Vincent
                            last edited by Dec 20, 2019, 5:25 AM

                            @Michael-Vincent Thank you for the information. This will save me countless hours of frustration in the future. Where do I send the check?

                            M 1 Reply Last reply Dec 20, 2019, 10:48 AM Reply Quote 1
                            • M
                              Michael Vincent @Moon Watcher
                              last edited by Michael Vincent Dec 20, 2019, 10:48 AM Dec 20, 2019, 10:48 AM

                              @Moon-Watcher said in Easier Rollback for edits:

                              Where do I send the check beer?

                              Your welcome.

                              1 Reply Last reply Reply Quote 2
                              14 out of 18
                              • First post
                                14/18
                                Last post
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors