Topic: Problem with Replace Dialog (1 of 7), Read 92 times
Conf: Search and Replace
From: Rich Hureau
Date: Thursday, July 11, 2002 08:35 PM

I have encountered a small bug (or inconsistency) in Vedit. I
have noticed that sometimes when I make a selection and then do
a Replace, the Replace dialog box does NOT have Block or
Begin-of-File/Block checked, even if the cursor is within the
block when I invoke the Replace. They USUALLY are checked and I
get used to it, but sometimes they aren't, I don't notice, and
the Replace goes flying off farther into the file and can do
real damage, especially when you select All for the replace.

I think I can recreate the problem. If you first do a Column
block, do a replace (you don't even have to do it, just bring up
the dialog and cancel), then unselect, then do a multiple-line
line block, then do a Go to Block Begin, then do a Replace. The
Block and Begin-of-File/Block boxes are not checked in the
dialog.

I agree that this is a pretty esoteric sequence, but it keeps
biting me in the rear occasionally, so there may be other
sequences that cause the same thing to happen.

Some possibly relevant settings:

Config( E_E_SHFT_BK, "Enable Shift block marking", 1 )
Config( E_E_PERS_BK, "Enable persistent blocks", 1 )
Config( E_AUTO_REPLACE, "Auto-replace block with new text (0 - 7)", 2 )
Config( E_ADV_CR_BK, "Advance cursor past block insert", 0 )
Config( E_BM_MODE, "Block marker emulation mode (0 - 7)", 2 )

Also, I'm using Win98 and Vedit 6.03.2 (6/30/02; the problem
also existed in the 6/28 version).

Thanks,
Rich

 


Topic: Problem with Replace Dialog (2 of 7), Read 91 times
Conf: Search and Replace
From: Christian Ziemski
Date: Friday, July 12, 2002 02:07 AM

Richard:

Months ago I had a similar "problem".
Perhaps it has been the same as yours.


It wasn't a bug here but a feature of VEDIT:

If a marked block is smaller than 52 bytes it
isn't treated as block for searching/replacing in
but it's treated as string to search for!

If you invoke the search/replace dialog you will see your highlighted characters in the "Search:" input field.


From the online help:

"The following rules determine VEDIT's behavior when a block has been highlighted and you then select {SEARCH, Search} or {SEARCH, Replace}.

1. If the beginning of the block has been set, but the current block size is zero (e.g., you just pressed ), it is assumed that you want to search for the end of the block, and nothing special is done.

2. If the cursor is within a small highlighted "stream" block of 40 characters or less, the block is used as the search string. The search is not within this small block. "


Christian

 


Topic: Problem with Replace Dialog (3 of 7), Read 90 times
Conf: Search and Replace
From: Rich Hureau
Date: Friday, July 12, 2002 12:49 PM

Christian,
Unfortunately, the problem I'm talking about seems to work with any size block, including large ones. Try it. I just tried it with first doing a large column block, a replace, then an unselect, a large paragraph block, a go-to-begin of block and then a replace. As I said, following this scenario with any size block encounters the problem.

If you're thinking that it is silly to do a go-to-beginning of the block before doing the replace (since the dialog has a check box to specify that), yes, I suppose it is, but doing so does recreate the problem, which is what we strive for in bug reporting, and doing so shouldn't cause the problem I'm encountering, even if it is silly.

I agree that the feature you mentioned for the handling of small blocks is a good one. :-)

Rich

 


Topic: Re: Problem with Replace Dialog (4 of 7), Read 92 times
Conf: Search and Replace
From: Christian Ziemski
Date: Friday, July 12, 2002 04:06 PM


Richard,

I still can't replicate it.

What is a "large" block for you? Maybe it's size dependent?
How do you go to block begin? Via {Goto} menu?
Which version of VEDIT are you using?

Perhaps another user will try it too.

Christian

 


Topic: Re: Problem with Replace Dialog (5 of 7), Read 89 times
Conf: Search and Replace
From: Ted Green
Date: Friday, July 12, 2002 04:02 PM

At 08:35 PM 7/11/2002, you wrote:
>I have encountered a small bug (or inconsistency) in Vedit.

I can replicate this bug as follows:
1. Go to column 5 of line 1.
2. Press to begin highlighting a line block.
3. Cursor down a few lines.
4. Press again.
5. Press to go to the beginning of the block;
notice that this takes you to column 1 of line 1.
6. Press to perform a Replace; "Block" is not selected.

These line blocks are tricky (a real pain) to implement because they include characters outside of the Block_Begin and Block_End values. In this case Block_Begin is set to column 5, not column 1. Evidently, my code for checking whether the "Block" option should be auto-selected in the dialog box isn't adjusting for the line block.

You might wonder why I don't simply adjust Block_End to column 1 when a line block is selected. Well, I want to be able to change the block type in mid stream. For example, in step 4 above, you could press to switch to a columnar block.

Anyway, I will fix this after I get back from vacation in two weeks.

Ted.

 


Topic: Re: Problem with Replace Dialog (6 of 7), Read 91 times
Conf: Search and Replace
From: Christian Ziemski
Date: Friday, July 12, 2002 04:28 PM

Aha!
I overlooked the word "line" in Richard's messages and therefore used
normal stream blocks. So I wasn't able to replicate.

Christian

 


Topic: Re: Problem with Replace Dialog (7 of 7), Read 90 times
Conf: Search and Replace
From: Rich Hureau
Date: Friday, July 12, 2002 07:08 PM

Ted,
I'm glad you were able to zero-in on the culprit (the fact that I was starting my first line block with the cursor NOT on column 1). This explains why I've been encountering the problem more often than my complex instructions would imply. I live by line blocks (guess that's because I used to be a mainframer). Thanks for looking into the problem!

Rich