Community
    • Login

    Plugin Feature needed

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    21 Posts 8 Posters 5.0k Views 3 Watching
    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.
    • dailD Offline
      dail @Ekopalypse
      last edited by

      @ekopalypse said in Plugin Feature needed:

      that would require some maths to calculate the actual position with the clicked position

      The math part isn’t not too bad actually. Just translate a line number into a Y position. For example:

      https://github.com/dail8859/NotepadNext/blob/3268c8e76f99af6a983ac2f202c712529248ec34/src/NotepadNext/decorators/HighlightedScrollBar.cpp#L120-L129

      I don’t know how to do this with Win32 scrollbars but in theory should be possible.

      EkopalypseE 1 Reply Last reply Reply Quote 3
      • EkopalypseE Offline
        Ekopalypse @dail
        last edited by

        @dail

        cool thx, makes it easier to play with :-) I haven’t done anything with scrollbars yet either, to be honest I usually disable them :-)

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

          @alan-kilborn said in Plugin Feature needed:

          VS IDE

          Well … You know my relationship with VS IDE … don’t you :-D

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

            This feature would be kind of cool, but wouldn’t it potentially cause performance problems because on a Find Next it would have to find all occurrences in a possibly huge file?

            The same possibility presents itself for a “Found X of Y” feature, as mentioned HERE.

            It seems like with the recent addition of better huge file support, some of Notepad++'s features need to be restricted (i.e., turned off) if the user is currently in such a file.

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

              It would if it was running on the main thread, but I suppose it could also run in the background on another thread or asynchronously.

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

                @ekopalypse said in Plugin Feature needed:

                if it was running on the main thread

                I thought Notepad++ was single-threaded, mainly because, until quite recently, Scintilla was not multi-thread capable? (I could be wrong about some/all of this). Of course, things can be changed (beauty of s/w).

                EkopalypseE dailD 2 Replies Last reply Reply Quote 0
                • EkopalypseE Offline
                  Ekopalypse @Alan Kilborn
                  last edited by

                  @alan-kilborn

                  yes, but as long as you don’t change anything from the Scinitilla/Notepad++ point of view, you can use another thread to make it do some work.

                  1 Reply Last reply Reply Quote 2
                  • dailD Offline
                    dail @Alan Kilborn
                    last edited by

                    @alan-kilborn said in Plugin Feature needed:

                    until quite recently, Scintilla was not multi-thread capable

                    Only multi-threaded in regards to computing line lengths for rendering the document. It is not meant to be accessed by multiple threads simultaneously.

                    @ekopalypse said in Plugin Feature needed:

                    don’t change anything from the Scinitilla/Notepad++ point of view

                    Even searching though a document with a background thread and then the main thread editing the document could lead to very bad scenarios. This is even more likely if the document is large and the search term occurs infrequently.

                    PythonScript has proven multi-threaded access is not generally a good idea when it comes to Scintilla.

                    EkopalypseE 1 Reply Last reply Reply Quote 3
                    • EkopalypseE Offline
                      Ekopalypse @dail
                      last edited by

                      @dail

                      In general I agree, but in this particular case, which is all about search, I can’t see a race condition.
                      But keep in mind, that I am a overconfident hobby programmer who may not see the big picture :-).

                      1 Reply Last reply Reply Quote 1
                      • Janis OgoliJ Offline
                        Janis Ogoli
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote -1

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors