Skip to content

Commit

Permalink
refactor: change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
r-plus committed Mar 20, 2021
1 parent 51cdc86 commit 4f7d30d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions XVim2/Xcode/SourceEditorViewProxy+XVim.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#import "XVimOptions.h"
#import "XVimXcode.h"
#import "XVim2-Swift.h"
#import <SourceEditor/SourceEditorScrollView.h>
#import <IDESourceEditor/_TtC15IDESourceEditor19IDESourceEditorView.h>

@interface SourceEditorViewProxy ()
Expand Down Expand Up @@ -829,9 +830,10 @@ - (NSRange)xvim_currentWord:(MOTION_OPTION)opt
// zero index
- (LineRange)xvim_visibleLineRange
{
let xcode12_workaround_offset = 20.0;
let topPoint = NSMakePoint(0.0, self.sourceEditorViewSize.height - self.contentSize.height - xcode12_workaround_offset);
let bottomPoint = NSMakePoint(0.0, self.sourceEditorViewSize.height - xcode12_workaround_offset);
// This is 20.0 for command line bar height that defined as `XvimCommandLineHeight` in SourceEditorViewProxy.m
let bottomInset = self.sourceEditorView.scrollView.contentInsets.bottom;
let topPoint = NSMakePoint(0.0, self.sourceEditorViewSize.height - self.contentSize.height - bottomInset);
let bottomPoint = NSMakePoint(0.0, self.sourceEditorViewSize.height - bottomInset);

NSInteger topLine =
[self lineRangeForCharacterRange:NSMakeRange([self characterIndexForInsertionAtPoint:topPoint], 0)]
Expand Down

0 comments on commit 4f7d30d

Please sign in to comment.