//ポップアップ対象の行を集めて構築。ここは受信スレッドでの実行であることに注意 private void ProcessCommandResult(int end_line_id) { List <GLine> result = new List <GLine>(); TerminalDocument doc = _terminal.GetDocument(); GLine line = doc.FindLineOrNull(_commandStartLineID); while (line != null && line.ID <= end_line_id) { //Debug.WriteLine("P]"+new string(line.Text, 0, line.DisplayLength)); result.Add(line); line = line.NextLine; } //何かとれていたら実行 if (result.Count > 0) { _currentProcessor.EndCommand(result); } else { Debug.WriteLineIf(DebugOpt.CommandPopup, String.Format("Ignored for 0-length, start={0} end={1}", _commandStartLineID, end_line_id)); } _currentProcessor = null; }