Fix selected line numbers drawing

This commit is contained in:
1024jp 2016-04-24 23:51:35 +09:00
parent d8e59eeefd
commit d801041612
4 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,7 @@
Change Log
==========================
2.5.1 (119)
2.5.1 (120)
--------------------------
### Improvements
@ -16,6 +16,7 @@ Change Log
- Fix an issue where application could crash on opening empty file.
- Fix an issue where `cot` command could fail creating new empty file.
- Fix an issue where selected line numbers were not drawn in bold font.

View File

@ -49,6 +49,7 @@
<ul>
<li>Fix an issue where application could crash on opening empty file.</li>
<li>Fix an issue where <code>cot</code> command could fail creating new empty file.</li>
<li>Fix an issue where selected line numbers were not drawn in bold font.</li>
</ul>
</section>
</article>

View File

@ -49,6 +49,7 @@
<ul>
<li>空のファイルを開くとアプリケーションがクラッシュする不具合を修正</li>
<li>cot コマンドで新規ファイル作成に失敗することがある不具合を修正</li>
<li>選択行の行番号がボールド表示になっていなかった不具合を修正</li>
</ul>
</section>
</article>

View File

@ -292,9 +292,9 @@ static CGFontRef BoldLineNumberFont;
for (NSValue *selectedLineValue in selectedLineRanges) {
NSRange selectedRange = [selectedLineValue rangeValue];
if (NSLocationInRange(lineRange.location, selectedRange) &&
(isVerticalText && ((lineRange.location == selectedRange.location) ||
(NSMaxRange(lineRange) == NSMaxRange(selectedRange)))))
if ((!isVerticalText && NSLocationInRange(lineRange.location, selectedRange)) ||
(isVerticalText && (lineRange.location == selectedRange.location ||
NSMaxRange(lineRange) == NSMaxRange(selectedRange))))
{
isSelected = YES;
break;