Zeus IDE Forum Index Zeus IDE
Use this forum to ask for help, submit a bug report or make a suggestion.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WordDeletePrevious bug

 
Post new topic   Reply to topic    Zeus IDE Forum Index -> Reporting a Bug
View previous topic :: View next topic  
Author Message
Julian



Joined: 27 Aug 2006
Posts: 1

PostPosted: Sun Aug 27, 2006 6:36 pm    Post subject: WordDeletePrevious bug Reply with quote

Just wanted to report a problem with the WordDeletePrevious that is assigned to the CTRL-BACKSPACE, this is the standard windows function for that key combination as well as the BriefEx configuration I am using. When there are no spaces separating the 'words' in the area of the cursor, it will frequently delete material to the right of the cursor when only the left section should be deleted. For example:

This sentence would work fine since it is nicely spaced.

Code doesn't work frequently, like

somevar:1234; someothervar:abd;

In the last example above, if I position my cursor to the right of the second colon (i.e. right before abd) then the first CTRL-BACKSPACE will delete the colon only (which is fine), the second CTRL-BACKSPACE will delete 'someothervar' AS WELL AS 'abd' which is clearly wrong since it is to the right of the cursor. I suspect that the editor considers the cursor in the middle of a single word and deletes the whole thing. This, however, is entirely incorrect behavior, both Windows and Brief delete only what is to the left of the cursor. The way it is now, if you are coding and want to delete a few words to the left of the cursor and consequently press CTRL-BACKSPACE a few times to accomplish this, one generally ends up with large (or all) parts or the code to the right of the cursor missing as well. As I have a more than a decade's worth of conditioning working on Brief, I rarely pay attention to the keys combinations I use, they have become second nature, especially the CTRL-BACKSPACE. Suddenly code is missing, this is a major annoyance to me. Some kind of fix would be greatly appreciated unless there is some way I can fix this on my end?

Another issue, which may not be a bug but just my ineptitude in finding the proper documentation. In the Search and Replace using REGEXs I cannot seem to insert a newline. If I search for ';' and set the replace to ';\n' with REGEX (without the quotes, they are just for clarity here) checked the it simply inserts the three characters ';\n' rather than breaking the line at that point. Is this a bug, a short-coming, or my inability to comprehend something?

Thanks,
Julian
Back to top
View user's profile Send private message
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 2188

PostPosted: Sun Aug 27, 2006 11:44 pm    Post subject: Reply with quote

Hi Julian,

Quote:
Code doesn't work frequently, like

somevar:1234; someothervar:abd;

In the last example above, if I position my cursor to the right of the second colon (i.e. right before abd) then the first CTRL-BACKSPACE will delete the colon only (which is fine), the second CTRL-BACKSPACE will delete 'someothervar' AS WELL AS 'abd' which is clearly wrong since it is to the right of the cursor.

What happens is because the cursor is over a delimiter the first CTRL-BACKSPACE will delete all the delimiters character (ie the white space and the colon) and stop at the end of the previous word.

The second CTRL-BACKSPACE finds itselef at the end of the word so it deletes all the characters up to the next delimiter.

It would asume if it deletes someothervar:abd in one go that is because you don't have : defined as a delimiter in the document type Confused

Quote:
I suspect that the editor considers the cursor in the middle of a single word and deletes the whole thing.

This example illustrates how it will work:
Code:

somevar:1234; someothervar:abd;
                     ^
                     cursor here

a CTRL-BACKSPACE will produces this result:
Code:

somevar:1234; :abd;
             ^
             cursor here

So as you can see, you are correct in that it will delete the current word.
Quote:
Some kind of fix would be greatly appreciated unless there is some way I
can fix this on my end?

The following Lua macro should produce the desired result:
Code:

function key_macro()
    screen_update_disable()
    MarkColumnToggle()
    MoveWordPrevious()
    MarkDeleteEx()
    screen_update_enable()
    screen_update()
end

key_macro() -- run the macro

Just save it to the zScript diretory and bind it to the CTRL-BACKSPACE keys.

Quote:
Another issue, which may not be a bug but just my ineptitude in finding the proper documentation. In the Search and Replace using REGEXs I cannot seem to insert a newline.

This is a limitation of the current Zeus Sad

Cheers Jussi
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Zeus IDE Forum Index -> Reporting a Bug All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group