Mercurial > vim
comparison src/ops.c @ 140:8ecb0db93e9a
updated for version 7.0045
author | vimboss |
---|---|
date | Thu, 27 Jan 2005 14:41:15 +0000 |
parents | 225cc00b2eda |
children | 6df0106fc595 |
comparison
equal
deleted
inserted
replaced
139:a217baa06d43 | 140:8ecb0db93e9a |
---|---|
811 } | 811 } |
812 | 812 |
813 /* | 813 /* |
814 * Set y_current and y_append, according to the value of "regname". | 814 * Set y_current and y_append, according to the value of "regname". |
815 * Cannot handle the '_' register. | 815 * Cannot handle the '_' register. |
816 * Must only be called with a valid register name! | |
816 * | 817 * |
817 * If regname is 0 and writing, use register 0 | 818 * If regname is 0 and writing, use register 0 |
818 * If regname is 0 and reading, use previous register | 819 * If regname is 0 and reading, use previous register |
819 */ | 820 */ |
820 void | 821 void |
2994 y_current = curr; | 2995 y_current = curr; |
2995 } | 2996 } |
2996 #endif | 2997 #endif |
2997 | 2998 |
2998 /* | 2999 /* |
2999 * put contents of register "regname" into the text | 3000 * Put contents of register "regname" into the text. |
3000 * flags: PUT_FIXINDENT make indent look nice | 3001 * Caller must check "regname" to be valid! |
3001 * PUT_CURSEND leave cursor after end of new text | 3002 * "flags": PUT_FIXINDENT make indent look nice |
3002 * PUT_LINE force linewise put (":put") | 3003 * PUT_CURSEND leave cursor after end of new text |
3004 * PUT_LINE force linewise put (":put") | |
3003 */ | 3005 */ |
3004 void | 3006 void |
3005 do_put(regname, dir, count, flags) | 3007 do_put(regname, dir, count, flags) |
3006 int regname; | 3008 int regname; |
3007 int dir; /* BACKWARD for 'P', FORWARD for 'p' */ | 3009 int dir; /* BACKWARD for 'P', FORWARD for 'p' */ |
3633 { | 3635 { |
3634 vim_free(insert_string); | 3636 vim_free(insert_string); |
3635 if (regname == '=') | 3637 if (regname == '=') |
3636 vim_free(y_array); | 3638 vim_free(y_array); |
3637 } | 3639 } |
3640 /* If the cursor is past the end of the line put it at the end. */ | |
3638 if (gchar_cursor() == NUL | 3641 if (gchar_cursor() == NUL |
3639 && curwin->w_cursor.col > 0 | 3642 && curwin->w_cursor.col > 0 |
3640 && !(restart_edit || (State & INSERT))) | 3643 && !(restart_edit || (State & INSERT))) |
3641 { | 3644 { |
3642 --curwin->w_cursor.col; | 3645 --curwin->w_cursor.col; |