Mercurial > vim
comparison src/ops.c @ 3674:b9aa7fb4a928 v7.3.597
updated for version 7.3.597
Problem: 'clipboard' "autoselect" only applies to the * register. (Sergey
Vakulenko)
Solution: Make 'autoselect' work for the + register. (Christian Brabant)
Add the "autoselectplus" option in 'clipboard' and the "P" flag in
'guioptions'.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 10 Jul 2012 16:49:23 +0200 |
parents | 802b1a1b275f |
children | 7de7ef01288d |
comparison
equal
deleted
inserted
replaced
3673:cc076119f07a | 3674:b9aa7fb4a928 |
---|---|
960 #ifdef FEAT_CLIPBOARD | 960 #ifdef FEAT_CLIPBOARD |
961 /* When Visual area changed, may have to update selection. Obtain the | 961 /* When Visual area changed, may have to update selection. Obtain the |
962 * selection too. */ | 962 * selection too. */ |
963 if (name == '*' && clip_star.available) | 963 if (name == '*' && clip_star.available) |
964 { | 964 { |
965 if (clip_isautosel()) | 965 if (clip_isautosel_star()) |
966 clip_update_selection(); | 966 clip_update_selection(&clip_star); |
967 may_get_selection(name); | |
968 } | |
969 if (name == '+' && clip_plus.available) | |
970 { | |
971 if (clip_isautosel_plus()) | |
972 clip_update_selection(&clip_plus); | |
967 may_get_selection(name); | 973 may_get_selection(name); |
968 } | 974 } |
969 #endif | 975 #endif |
970 | 976 |
971 get_yank_register(name, 0); | 977 get_yank_register(name, 0); |
3188 /* Copy the text from register 0 to the clipboard register. */ | 3194 /* Copy the text from register 0 to the clipboard register. */ |
3189 copy_yank_reg(&(y_regs[PLUS_REGISTER])); | 3195 copy_yank_reg(&(y_regs[PLUS_REGISTER])); |
3190 | 3196 |
3191 clip_own_selection(&clip_plus); | 3197 clip_own_selection(&clip_plus); |
3192 clip_gen_set_selection(&clip_plus); | 3198 clip_gen_set_selection(&clip_plus); |
3193 if (!clip_isautosel() && !did_star && curr == &(y_regs[PLUS_REGISTER])) | 3199 if (!clip_isautosel_star() && !did_star |
3200 && curr == &(y_regs[PLUS_REGISTER])) | |
3194 { | 3201 { |
3195 copy_yank_reg(&(y_regs[STAR_REGISTER])); | 3202 copy_yank_reg(&(y_regs[STAR_REGISTER])); |
3196 clip_own_selection(&clip_star); | 3203 clip_own_selection(&clip_star); |
3197 clip_gen_set_selection(&clip_star); | 3204 clip_gen_set_selection(&clip_star); |
3198 } | 3205 } |