Community
    • Login

    Highlighting other occurences of currently selected word ignores occurences followed by ";"...

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    highlightselection
    6 Posts 3 Posters 3.4k 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.
    • Linus F.L
      Linus F.
      last edited by

      When I select a word, all other occurences of the word are highlighted. (Very practical while programming to find the occurences of your variables!)

      However, when the word is immediately followed by a semicolon, it gets not highlighted. Why?

      Screenshot

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Linus F.
        last edited by

        @Linus-F.

        this functionality searches for the whole word only and
        I assume the language you use treats the semicolon as a char which might be part
        of a word, could this be?

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Linus F.L
          Linus F.
          last edited by

          Hi Claudia,

          the problem even occurs if you just try it with an empty new document in Notepad++. So it is irrespective of the programming language used. But it does particularly occur with c(++) files, where I guess “;” should not be considered part of a word?

          Is there any way to tell Notepad++ that “;” should not be considered part of a word?

          Thanks,
          Linus

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @Linus F.
            last edited by

            Hi Linus,

            in one of the latest version a new section word char list has been added.
            But this it normally used to add new chars.
            Maybe you wanna check if, why ever, there has been the semicolon set.
            If this isn’t the case, by any chance, do you have python script plugin installed?

            Cheers
            Claudia

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

              Hi, @linus-f,

              I don’t understand ! I did a try, with a new tab and language = C++

              I inserted the text below, where the first line is the simple string test, only :

              test
               test 
              !test!
              "test"
              #test#
              $test$
              %test%
              &test&
              'test'
              (test(
              )test)
              *test*
              +test+
              ,test,
              -test-
              .test.
              /test/
              0test0
              :test:
              ;test;
              <test<
              =test=
              >test>
              ?test?
              @test@
              [test[
              \test\
              ]test]
              ^test^
              _test_
              `test`
              {test{
              |test|
              }test}
              ~test~
              

              And I confirm that all the occurrences, of the string test, are highlighted in green, except for the two :

              0test0
              _test_
              

              Logic, because, for these two lines, the string test is part of the words 0test0 and test !

              You should verify which options are set/unset in Settings > Preferences… > Highlighting > Smart Highlighting. With the default options, that I’m using, only the options Enable and Match whole word only are checked !

              If you cannot see any problem in your settings, may be an installed plugin could disturb the default N++ behaviour !

              Best Regards,

              guy038

              1 Reply Last reply Reply Quote 0
              • Linus F.L
                Linus F.
                last edited by

                I’ll be damned! Just tried it again, and now it works as expected…

                Screenshot

                No idea, what has changed since the last time… Maybe just a glitch?
                Thanks anyway for your assistance.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors