}\r
\r
/// <summary>\r
+ /// 行の先頭に移動する\r
+ /// </summary>\r
+ /// <param name="row">行</param>\r
+ /// <param name="isSelected">選択状態にするかどうか</param>\r
+ public void JumpToLineHead(int row,bool isSelected)\r
+ {\r
+ this.View.JumpCaret(row, 0);\r
+ this.View.AdjustCaretAndSrc();\r
+ this.SelectWithMoveCaret(isSelected);\r
+ }\r
+\r
+ /// <summary>\r
+ /// 行の終わりに移動する\r
+ /// </summary>\r
+ /// <param name="row">行</param>\r
+ /// <param name="isSelected">選択状態にするかどうか</param>\r
+ public void JumpToLineEnd(int row, bool isSelected)\r
+ {\r
+ this.View.JumpCaret(row, this.View.LayoutLines[row].Length - 1);\r
+ this.View.AdjustCaretAndSrc();\r
+ this.SelectWithMoveCaret(isSelected);\r
+ }\r
+\r
+ /// <summary>\r
/// ドキュメントの先頭に移動する\r
/// </summary>\r
/// <param name="isSelected"></param>\r
if (isControlPressed)\r
this._Controller.JumpToHead(isShiftPressed);\r
else\r
- this._Controller.JumpCaret(this.View.CaretPostion.row, 0);\r
+ this.Controller.JumpToLineHead(this.View.CaretPostion.row,isShiftPressed);\r
this.Refresh();\r
isMovedCaret = true;\r
break;\r
if (isControlPressed)\r
this._Controller.JumpToEnd(isShiftPressed);\r
else\r
- this._Controller.JumpCaret(this.View.CaretPostion.row, this.View.LayoutLines[this.View.CaretPostion.row].Length - 1);\r
+ this.Controller.JumpToLineEnd(this.View.CaretPostion.row,isShiftPressed);\r
this.Refresh();\r
isMovedCaret = true;\r
break;\r
if (this.IsPressedModifierKey(modiferKeys, ModifierKeys.Control))\r
this._Controller.JumpToHead(this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));\r
else\r
- this._Controller.JumpCaret(this.View.CaretPostion.row, 0);\r
+ this._Controller.JumpToLineHead(this.View.CaretPostion.row, this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));\r
this.Refresh();\r
movedCaret = true;\r
break;\r
if (this.IsPressedModifierKey(modiferKeys, ModifierKeys.Control))\r
this._Controller.JumpToEnd(this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));\r
else\r
- this._Controller.JumpCaret(this.View.CaretPostion.row, this.View.LayoutLines[this.View.CaretPostion.row].Length - 1);\r
+ this._Controller.JumpToLineEnd(this.View.CaretPostion.row, this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));\r
this.Refresh();\r
movedCaret = true;\r
break;\r
break;\r
case Keys.Home:\r
if (e.Control)\r
- this.Controller.JumpToHead(false);\r
+ this.Controller.JumpToHead(e.Shift);\r
else\r
- this.Controller.JumpCaret(this.View.CaretPostion.row, 0);\r
+ this.Controller.JumpToLineHead(this.View.CaretPostion.row, e.Shift);\r
this.Refresh();\r
break;\r
case Keys.End:\r
if (e.Control)\r
- this.Controller.JumpToEnd(false);\r
+ this.Controller.JumpToEnd(e.Shift);\r
else\r
- this.Controller.JumpCaret(this.View.CaretPostion.row, this.View.LayoutLines[this.View.CaretPostion.row].Length - 1);\r
+ this.Controller.JumpToLineEnd(this.View.CaretPostion.row, e.Shift);\r
this.Refresh();\r
break;\r
case Keys.Tab:\r