Texmaker and TeXstudioStop search (& replace) at current cursor position

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

Stop search (& replace) at current cursor position

Post by Montag »

Hello,

does anyone know if TexmakerX can remember the current cursor position wheren starting a search (which actually is the position in the document where the search started) so that after an entire document and the relevant term was searched & replaced, that it won't start over again?
There is a dialogue after the search

Code: Select all

8 out of 8 hits replaced.

Should the replace be repeated from the beginning of the document?
(I roughly translated the German dialogue into English, sorry if there are mistakes), but in TXC, the editor remembers where the search & replace was started and even if this dialogue pops up, it'll stop at the posistion where the first term was found & replaced so there are no double entries. Double entries like this often happen when performing search & replaces queues like

Code: Select all

\begin{itemize}
and

Code: Select all

\begin{itemize}\setlength{\itemsep}{-3pt}
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

benibela
Posts: 97
Joined: Thu Aug 09, 2007 8:13 pm

Re: Stop search (& replace) at current cursor position

Post by benibela »

I think you found a bug and I will change that in the next version. (or does anyone here has an example, where the current behavior is more useful?)

Meanwhile, you could only disable the cursor checkbox, then replace all will replace every line only once.

Benito
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

Re: Stop search (& replace) at current cursor position

Post by Montag »

To be honest, I haven't really figured it out yet. I think I am sure about the double-entries, but if I undestood it correctly, TeXMakerX always start at the top of a .tex-file to work the search (& replace) queue. (Right?) But then it jumps back to the cursor, I guess. It's a bit irritating for me, because so far, I was used to and still am to TXC.

But thank you for taking care.
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
benibela
Posts: 97
Joined: Thu Aug 09, 2007 8:13 pm

Stop search (& replace) at current cursor position

Post by benibela »

enrico wrote:TeXMakerX always start at the top of a .tex-file to work the search (& replace) queue. (Right?) But then it jumps back to the cursor,
No, usually in the default it will start from the current cursor position and not jump back (except if your search reach the document end, than it will start from the beginning ).
However, if you disable the cursor checkbox, everything changes and it will start from the beginning, if you don't continue a search.

But this panel is very confusing, because there are some combinations of checkboxes and buttons (2^8 * 6), and in contrast to my post above, the cursor checkbox doesn't fix the replace all button bug. (I usually never disable it)

[edit:] But you could enable the Nachfragen checkbox to cancel the search once it looped through

Benito
Post Reply