 |
Zeus Use this forum to ask for help, submit a bug report or make a suggestion.
|
| View previous topic :: View next topic |
| Author |
Message |
Julian
Joined: 27 Aug 2006 Posts: 1
|
Posted: Sun Aug 27, 2006 6:36 pm Post subject: WordDeletePrevious bug |
|
|
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 |
|
 |
jussij Site Admin
Joined: 13 Aug 2004 Posts: 1938
|
Posted: Sun Aug 27, 2006 11:44 pm Post subject: |
|
|
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
| 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
Cheers Jussi |
|
| Back to top |
|
 |
|
|
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
|