Community
    • Login

    How to highlight lines with color one by one?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    22 Posts 7 Posters 7.3k Views 2 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.
    • CoisesC Offline
      Coises @Alan Kilborn
      last edited by

      @Alan-Kilborn said in How to highlight lines with color one by one?:

      While line information (both document and display) is easy to obtain, position data for wrapped lines (e.g. position of where each wrapping occurs) doesn’t seem to be available.
      […]
      I think it would be a bigger effort than I consider worth it to put in. Unless…someone sees it differently and there is a straightforward way to do it.

      I had to deal with a somewhat similar problem (getting the “real” pixel width of text that might be wrapped) here. It’s possible, but messy — SCI_WRAPCOUNT will tell you if a line is wrapped, but then you have to loop through character by character checking SCI_POINTYFROMPOSITION to determine where the wrapping happens.

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

        @Coises said in How to highlight lines with color one by one?:

        …loop through character by character checking SCI_POINTYFROMPOSITION to determine where the wrapping happens

        The original script fires its logic every time the UI is updated (maybe that could be changed to every time the data is modified instead).
        When I wrote the original script, I had “performance” concerns for the script, with moderately-sized files and larger.
        I have even more concerns about that if the script is changed for the newly requested feature for it (which would incorporate the “looping” @Coises mentioned).

        1 Reply Last reply Reply Quote 1
        • Alan KilbornA Alan Kilborn referenced this topic on

        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