Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Clip losing track of osition in document

Expand Messages
  • hsavage
    ... ^!Find. ... I could not find a way to learn the actual row and column position as reported on the status line when text is selected. I can get the
    Message 1 of 5 , Jan 19, 2005
    • 0 Attachment
      Jamal Mazrui wrote:
      > Thanks for your response. I mistakenly wrote ^$Find$ rather than
      ^!Find.
      >
      > Since posting that message, I discovered that I misunderstood something,
      > and that NTP is, in fact, behaving as described.

      I could not find a way to learn the actual row and column position as
      reported on the status line when text is selected. I can get the
      position at the start or end of the selection using different functions,
      but they do not tell me whether the cursor is currently at the start or
      end of the selection. Usually, it is at the end since one typically
      selects text in a forward direction. If one selects or does a Find in
      the other direction, however, the cursor is at what NTB considers the
      beginning of the selection, even though one began selecting at a point
      lower in the document.
      >
      > I want a way that a clip can reliably tell the actual cursor
      position, as reported on the status line. Any suggestions?
      >
      > Regards,
      > Jamal

      Jamal,

      This test clip may give you some ideas to work with, it gives start of
      selection position and end of selection position. You can determine
      what you need to do at that point. You do, however, need to keep in
      mind whether is was a 'forward' or 'reverse' selection. Paste this into
      a clipbook and give it a try. Keep in mind, anytime the cursor is
      physically moved any selection will be de-selected.

      The Info line will be wrapped in email, it is a single line, unwrapping
      will give a complete display in th Info box. It isn't too critical,
      just get all text on 1 line in unwrap mode.

      ----------------------------
      H="Find Cursor Position"
      ^!Set %curstart%=^$GetRowStart$:^$GetColStart$
      ^!Set %curend%=^$GetRowEnd$:^$GetColEnd$
      ; this ^!Info [L] line will give the start row/col and,
      ; end row/col of selection
      ;
      ;
      ^!Info [L]Selected Text Boundaries,^%nl%Top Row/Col >
      ^%curstart%^%nl%Bottom Row/Col > ^%curend%
      ;
      ^!Delay 50
      ; this command moves cursor to row/col position at
      ; beginning of selection stored in curstart variable
      ^!SetCursor ^%curstart%
      ^!Delay 50
      ; this command moves cursor to row/col position at
      ; end of selection stored in curend variable.
      ^!SetCursor ^%curend%
      ----------------------------

      > I don't know of any to freeze/isolate Ctrl+F from the ^!Find command
      > entry list. The ^!Find entry list in NotePro/Tab ini is capable of 15
      > entries, the oldest, least used entry is discarded when the 16th entry
      > is searched for.

      The NotePro/Tab ini file can be edited, send an example of exactly how
      you want the [Find] section to be after re-construction and I'm sure
      several of us will work on it with you.

      ºvº
      05.01.19
      hrs > hsavage@...
    Your message has been successfully submitted and would be delivered to recipients shortly.