Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
pebble8888 committed Jul 1, 2021
2 parents 8570242 + 8c0e54d commit 7b26f9d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,47 @@

NOTE: SIMBL plugin system required disabling some security feature to work on recently macOS.

1. Setup [MacForge](https://github.com/MacEnhance/MacForge) with disabling Library Validation and System Integrity Protection (SIP).
1. Setup [MacForge](https://github.com/MacEnhance/MacForge) with disabling Library-Validation and System Integrity Protection (SIP).

2. make:
2. Reboot your mac to take effect disabling Library-Validation.

3. make:
```bash
$ make simbl
```

### Compatibility matrix


<table>
<tr>
<th>Xcode</th>
<th>OS security configuration</th>
<th>loading system</th>
<th>x64</th>
<th>arm64</th>
</tr>
<tr>
<td>re-codesign (occur <a href="https://github.com/XVimProject/XVim2/issues/340">Apple ID login problem on BigSur</a>)</td>
<td>any</td>
<td rowspan=2>Xcode Plugin</td>
<td>✅</td>
<td>✅</td>
</tr>
<tr>
<td rowspan=2>original</td>
<td rowspan=2>disable Library-Validation and SIP</td>
<td>✅</td>
<td>✅</td>
</tr>
<tr>
<td>SIMBL</td>
<td>✅</td>
<td>MacForge 1.1.0 not yet support M1</td>
</tr>
</table>
Tested on macOS 11.2.3, Xcode 12.4

## Branches and Releases

- `master`: for the lastest GM Xcode.
Expand Down
9 changes: 8 additions & 1 deletion XVim2/Xcode/SourceEditorViewProxy+Operations.m
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,17 @@ - (void)xvim_insertNewlineAboveCurrentLineWithIndent
{
NSUInteger head = [self.textStorage xvim_startOfLine:self.insertionPoint];
if (0 != head) {
// https://github.com/XVimProject/XVim2/issues/144
// Current cursor charactor will be temporary invisible
// when set `selectedRange` property to move cursor to above line of tail position with insert mode. (Why)
// Cursor move up to above line with normal mode is workaround for its issue.
[self setSelectedRange:NSMakeRange(head - 1, 0)];
self.cursorMode = XVIM_CURSOR_MODE_INSERT;
[self setSelectedRange:NSMakeRange(head - 1, 0)];
[self insertNewline:self];
}
else {
self.cursorMode = XVIM_CURSOR_MODE_INSERT;
[self setSelectedRange:NSMakeRange(head, 0)];
[self insertNewline:self];
[self setSelectedRange:NSMakeRange(0, 0)];
Expand All @@ -268,7 +275,7 @@ - (void)xvim_insertNewlineAboveCurrentLineWithIndent

- (void)xvim_insertNewlineAboveAndInsertWithIndent
{
self.cursorMode = XVIM_CURSOR_MODE_INSERT;
// set `cursorMode` inside this method to workaround https://github.com/XVimProject/XVim2/issues/144
[self xvim_insertNewlineAboveCurrentLineWithIndent];
}

Expand Down

0 comments on commit 7b26f9d

Please sign in to comment.