「上に行挿入」の版間の差分
編集の要約なし |
編集の要約なし |
||
| 11行目: | 11行目: | ||
var insertIndent = true; | var insertIndent = true; | ||
selection = Document.Selection; | var selection = Document.Selection; | ||
var | var activeY = selection.GetActivePointY(mePosLogical); | ||
var line = Document.GetLine( | var line = Document.GetLine(activeY); | ||
var lineIndent = line.match(/^[ \t ]*/); | var lineIndent = line.match(/^[ \t ]*/); | ||
selection.StartOfLine(false, mePosLogical); | selection.StartOfLine(false, mePosLogical); | ||
if (insertIndent) { | if (insertIndent) { | ||
selection.Text = lineIndent; | selection.Text = lineIndent + '\n'; | ||
} else { | |||
selection.Text = '\n'; | |||
} | } | ||
selection.LineUp(); | |||
selection. | selection.EndOfLine(false, mePosLogical); | ||
Redraw = true; | Redraw = true; | ||
</source> | </source> | ||
スポンサーリンク