Skip to content

Commit

Permalink
Change 文字数(バイト数でない)をカウントするときはEOLは含めない
Browse files Browse the repository at this point in the history
  • Loading branch information
niki committed Apr 7, 2024
1 parent 3da7848 commit 00caab1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sakura_core/view/CViewSelect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ void CViewSelect::PrintSelectionInfoMsg() const
} else { // 2行以上選択されている場合
select_sum =
pcLayout->GetLengthWithoutEOL()
+ pcLayout->GetLayoutEol().GetLen()
/*nkmm + pcLayout->GetLayoutEol().GetLen()*/
- pView->LineColumnToIndex( pcLayout, m_sSelect.GetFrom().GetX2() );

// GetSelectedDataと似ているが,先頭行と最終行は排除している
Expand All @@ -802,7 +802,8 @@ void CViewSelect::PrintSelectionInfoMsg() const
// 2006.06.06 ryoji 指定行のデータが存在しない場合の対策
if( NULL == pLine )
break;
select_sum += pcLayout->GetLengthWithoutEOL() + pcLayout->GetLayoutEol().GetLen();
//nkmm select_sum += pcLayout->GetLengthWithoutEOL() + pcLayout->GetLayoutEol().GetLen();
select_sum += pcLayout->GetLengthWithoutEOL();
}

// 最終行の処理
Expand Down

0 comments on commit 00caab1

Please sign in to comment.