~ubuntu-branches/ubuntu/lucid/monodevelop/lucid

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActions.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (1.2.6 upstream) (1.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100202113959-s4exdz7er7igylz2
Tags: 2.2.1+dfsg-1
* New upstream release
* debian/control:
  + Standards version 3.8.4 (no changes needed)
* debian/patches/remove_support_for_non_debian_functionality.patch,
  debian/patches/remove_support_for_soft_debugger.patch,
  debian/patches/remove_support_for_moonlight.patch,
  debian/rules:
  + Split patch into two pieces, to make it easier to enable either
    SDB or Moonlight support with a rebuild
* debian/monodevelop-moonlight.install,
  debian/monodevelop-debugger-sdb.install,
  debian/control:
  + Create packaging data for the Soft Debugger addin and Moonlight addin -
    and comment them out of debian/control as we can't provide them on
    Debian for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
                        LineSegment segment = data.Document.GetLine (data.Caret.Line);
170
170
                        if (segment.EndOffset-1 > data.Caret.Offset) {
171
171
                                CaretMoveActions.Right (data);
 
172
                                RetreatFromLineEnd (data);
172
173
                        }
173
174
                }
174
175
                
178
179
                                CaretMoveActions.Left (data);
179
180
                        }
180
181
                }
 
182
                
 
183
                public static void Down (TextEditorData data)
 
184
                {
 
185
                        int desiredColumn = System.Math.Max (data.Caret.Column, data.Caret.DesiredColumn);
 
186
                        
 
187
                        CaretMoveActions.Down (data);
 
188
                        RetreatFromLineEnd (data);
 
189
                        
 
190
                        data.Caret.DesiredColumn = desiredColumn;
 
191
                }
 
192
                
 
193
                public static void Up (TextEditorData data)
 
194
                {
 
195
                        int desiredColumn = System.Math.Max (data.Caret.Column, data.Caret.DesiredColumn);
 
196
                        
 
197
                        CaretMoveActions.Up (data);
 
198
                        RetreatFromLineEnd (data);
 
199
                        
 
200
                        data.Caret.DesiredColumn = desiredColumn;
 
201
                }
 
202
                
 
203
                public static void LineEnd (TextEditorData data)
 
204
                {
 
205
                        int desiredColumn = System.Math.Max (data.Caret.Column, data.Caret.DesiredColumn);
 
206
                        
 
207
                        CaretMoveActions.LineEnd (data);
 
208
                        RetreatFromLineEnd (data);
 
209
                        
 
210
                        data.Caret.DesiredColumn = desiredColumn;
 
211
                }
 
212
                
 
213
                internal static bool IsEol (char c)
 
214
                {
 
215
                        return (c == '\r' || c == '\n');
 
216
                }
 
217
                
 
218
                static void RetreatFromLineEnd (TextEditorData data)
 
219
                {
 
220
                        while (0 < data.Caret.Column && IsEol (data.Document.GetCharAt (data.Caret.Offset))) {
 
221
                                Left (data);
 
222
                        }
 
223
                }
181
224
        }
182
225
}