Mail Archives: djgpp/1997/08/20/22:49:36
On Wed, 13 Aug 1997 04:19:51 GMT, mapson AT mapson DOT com (mapson) wrote:
>Yes, at least with windows 95. Copying from, say, "Notepad" in to the
>DOS box containing Rhide, each line gets incrementally shifted to the
>right. I.e., put 10 lines in, the first line is proper, next line is
>shifted one space to the right, and the last line is 10 or so steps to
>the right.
>
>Big Problem? No- all you need to do is forego laziness and open up
>with Rhide the file you originally wanted to paste from. In the realm
>of "bugs" and whose bugs they might be... I'd say this is a
>particularly minor one.
It's not a bug, it's a feature :)
What you are seeing is a mixture of Windows's cut-and-paste on DOS
boxes and RHIDE's autoindent. Consider the following fragment:
int main(void) {
printf("Hello, cruel world!\n");
return 0;
}
If this is copied to the clipboard and pasted into RHIDE, RHIDE will
see (effectively) the user typing "int main(void) {" followed by a
newline and then " printf.....;", and another newline. Now RHIDE has
this in its window:
int main(void) {
printf("Hello, cruel world!\n");
_
Note the cursor position -- RHIDE's autoindent feature has put the
cursor under the `p'. Now Windows sends it: " return 0;", newline,
"}". There is a space before the `return', so the `r' is actually two
columns in. Similarly, the closing `}' will also be two columns in,
giving:
int main(void) {
printf("Hello, cruel world!\n");
return 0;
}
You've already mentioned one solution. Another is to turn off
autoindent while you paste. I hope this explains the (right) problem
:)
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -