Changeset f987504
- Timestamp:
- Jul 27, 2009, 11:23:57 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 8f16dcd
- Parents:
- 7be5d8b
- git-author:
- Nelson Elhage <nelhage@mit.edu> (07/27/09 23:22:21)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (07/27/09 23:23:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Completion.pm
rb73bcbb rf987504 46 46 sub insert_completion { 47 47 my $ctx = shift; 48 my $completion = shift;48 my $completion = BarnOwl::quote(shift); 49 49 my $unique = shift; 50 51 if($unique) { 52 $completion .= " "; 53 } 50 54 51 55 save_excursion { … … 53 57 BarnOwl::Editwin::set_mark(); 54 58 point_move($ctx->word_end - $ctx->word_start); 55 replace_region( BarnOwl::quote($completion));59 replace_region($completion); 56 60 }; 57 if($unique && $ctx->word == (scalar @{$ctx->words} - 1)) { 58 save_excursion { 59 BarnOwl::Editwin::set_mark(); 60 replace_region(' '); 61 }; 62 point_move(1); 61 if(!length($ctx->words->[$ctx->word])) { 62 point_move(length($completion)); 63 63 } 64 64 }
Note: See TracChangeset
for help on using the changeset viewer.