mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-25 23:02:35 +03:00
Merge branch 'develop' into issue/339-md-preview
This commit is contained in:
commit
7a37e418a2
@ -251,17 +251,11 @@ static CFDataRef local_server_callback(CFMessagePortRef local, SInt32 msgid, CFD
|
||||
}
|
||||
|
||||
case NeoVimAgentMsgIdGetBuffers: {
|
||||
NSUInteger responseId = response_id_from_data(data);
|
||||
server_buffers(responseId);
|
||||
|
||||
return nil;
|
||||
return [NSKeyedArchiver archivedDataWithRootObject:server_buffers()];
|
||||
}
|
||||
|
||||
case NeoVimAgentMsgIdGetTabs: {
|
||||
NSUInteger responseId = response_id_from_data(data);
|
||||
server_tabs(responseId);
|
||||
|
||||
return nil;
|
||||
return [NSKeyedArchiver archivedDataWithRootObject:server_tabs()];
|
||||
}
|
||||
|
||||
case NeoVimAgentMsgIdGetBoolOption: {
|
||||
|
@ -19,8 +19,8 @@ extern void server_resize(int width, int height);
|
||||
extern void server_vim_input_marked_text(NSString *markedText);
|
||||
extern bool server_has_dirty_docs();
|
||||
extern NSString *server_escaped_filename(NSString *filename);
|
||||
extern void server_buffers(NSUInteger responseId);
|
||||
extern void server_tabs(NSUInteger responseId);
|
||||
extern NSArray *server_buffers();
|
||||
extern NSArray *server_tabs();
|
||||
extern void server_get_bool_option(NSUInteger responseId, NSString *option);
|
||||
extern void server_set_bool_option(NSUInteger responseId, NSString *option, bool value);
|
||||
extern void server_select_win(int window_handle);
|
||||
|
@ -763,42 +763,20 @@ static NeoVimBuffer *buffer_for(buf_T *buf) {
|
||||
return [buffer autorelease];
|
||||
}
|
||||
|
||||
static void neovim_buffers(void **argv) {
|
||||
NSUInteger *values = (NSUInteger *) argv[0];
|
||||
NSUInteger responseId = values[0];
|
||||
|
||||
NSMutableArray <NeoVimBuffer *> *buffers = [[NSMutableArray new] autorelease];
|
||||
NSArray *server_buffers() {
|
||||
NSMutableArray <NeoVimBuffer *> *result = [[NSMutableArray new] autorelease];
|
||||
FOR_ALL_BUFFERS(buf) {
|
||||
NeoVimBuffer *buffer = buffer_for(buf);
|
||||
if (buffer == nil) {
|
||||
continue;
|
||||
}
|
||||
|
||||
[buffers addObject:buffer];
|
||||
[result addObject:buffer];
|
||||
}
|
||||
|
||||
NSData *resultData = [NSKeyedArchiver archivedDataWithRootObject:buffers];
|
||||
NSData *data = data_with_response_id_prefix(responseId, resultData);
|
||||
|
||||
[_neovim_server sendMessageWithId:NeoVimServerMsgIdSyncResult data:data];
|
||||
|
||||
free(values); // malloc'ed in loop_schedule(&main_loop, ...) (in _queue) somewhere
|
||||
return result;
|
||||
}
|
||||
|
||||
void server_buffers(NSUInteger responseId) {
|
||||
queue(^{
|
||||
NSUInteger *values = malloc(sizeof(NSUInteger));
|
||||
values[0] = responseId;
|
||||
|
||||
// free release in neovim_command
|
||||
loop_schedule(&main_loop, event_create(1, neovim_buffers, 1, values));
|
||||
});
|
||||
}
|
||||
|
||||
static void neovim_tabs(void **argv) {
|
||||
NSUInteger *values = (NSUInteger *) argv[0];
|
||||
NSUInteger responseId = values[0];
|
||||
|
||||
NSArray *server_tabs() {
|
||||
NSMutableArray *tabs = [[NSMutableArray new] autorelease];
|
||||
FOR_ALL_TABS(t) {
|
||||
NSMutableArray *windows = [NSMutableArray new];
|
||||
@ -821,22 +799,7 @@ static void neovim_tabs(void **argv) {
|
||||
[tab release];
|
||||
}
|
||||
|
||||
NSData *resultData = [NSKeyedArchiver archivedDataWithRootObject:tabs];
|
||||
NSData *data = data_with_response_id_prefix(responseId, resultData);
|
||||
|
||||
[_neovim_server sendMessageWithId:NeoVimServerMsgIdSyncResult data:data];
|
||||
|
||||
free(values); // malloc'ed in loop_schedule(&main_loop, ...) (in _queue) somewhere
|
||||
}
|
||||
|
||||
void server_tabs(NSUInteger responseId) {
|
||||
queue(^{
|
||||
NSUInteger *values = malloc(sizeof(NSUInteger));
|
||||
values[0] = responseId;
|
||||
|
||||
// free release in neovim_command
|
||||
loop_schedule(&main_loop, event_create(1, neovim_tabs, 1, values));
|
||||
});
|
||||
return tabs;
|
||||
}
|
||||
|
||||
void server_select_win(int window_handle) {
|
||||
|
@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.12.3</string>
|
||||
<string>0.12.4</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>156</string>
|
||||
<string>157</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -15,11 +15,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.12.3</string>
|
||||
<string>0.12.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>156</string>
|
||||
<string>157</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2016 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
@ -338,31 +338,23 @@ static CFDataRef local_server_callback(CFMessagePortRef local, SInt32 msgid, CFD
|
||||
}
|
||||
|
||||
- (NSArray <NeoVimBuffer *> *)buffers {
|
||||
NSUInteger reqId = [self nextRequestResponseId];
|
||||
NSData *data = [NSData dataWithBytes:&reqId length:sizeof(NSUInteger)];
|
||||
|
||||
[self sendMessageWithId:NeoVimAgentMsgIdGetBuffers data:data expectsReply:NO];
|
||||
NSData *responseData = [self responseByWaitingForId:reqId];
|
||||
if (responseData == nil) {
|
||||
NSData *response = [self sendMessageWithId:NeoVimAgentMsgIdGetBuffers data:nil expectsReply:YES];
|
||||
if (response == nil) {
|
||||
log4Warn("The response for the msg %lu was nil.", NeoVimAgentMsgIdGetBuffers);
|
||||
return @[];
|
||||
}
|
||||
|
||||
return [NSKeyedUnarchiver unarchiveObjectWithData:responseData];
|
||||
return [NSKeyedUnarchiver unarchiveObjectWithData:response];
|
||||
}
|
||||
|
||||
- (NSArray<NeoVimWindow *> *)tabs {
|
||||
NSUInteger reqId = [self nextRequestResponseId];
|
||||
NSData *data = [NSData dataWithBytes:&reqId length:sizeof(NSUInteger)];
|
||||
|
||||
[self sendMessageWithId:NeoVimAgentMsgIdGetTabs data:data expectsReply:NO];
|
||||
NSData *responseData = [self responseByWaitingForId:reqId];
|
||||
if (responseData == nil) {
|
||||
NSData *response = [self sendMessageWithId:NeoVimAgentMsgIdGetTabs data:nil expectsReply:YES];
|
||||
if (response == nil) {
|
||||
log4Warn("The response for the msg %lu was nil.", NeoVimAgentMsgIdGetTabs);
|
||||
return @[];
|
||||
}
|
||||
|
||||
return [NSKeyedUnarchiver unarchiveObjectWithData:responseData];
|
||||
return [NSKeyedUnarchiver unarchiveObjectWithData:response];
|
||||
}
|
||||
|
||||
- (void)runLocalServer {
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.12.3</string>
|
||||
<string>0.12.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>156</string>
|
||||
<string>157</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.12.3</string>
|
||||
<string>0.12.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>156</string>
|
||||
<string>157</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -1409,7 +1409,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 156;
|
||||
DYLIB_CURRENT_VERSION = 157;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1433,7 +1433,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 156;
|
||||
DYLIB_CURRENT_VERSION = 157;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1625,7 +1625,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 156;
|
||||
CURRENT_PROJECT_VERSION = 157;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@ -1675,7 +1675,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 156;
|
||||
CURRENT_PROJECT_VERSION = 157;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -36,7 +36,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.12.3</string>
|
||||
<string>0.12.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@ -53,7 +53,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>156</string>
|
||||
<string>157</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.12.3</string>
|
||||
<string>0.12.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>156</string>
|
||||
<string>157</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
19
appcast.xml
19
appcast.xml
@ -7,23 +7,22 @@
|
||||
<description>Most recent changes with links to updates for VimR.</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>v0.12.3-156</title>
|
||||
<title>v0.12.4-157</title>
|
||||
<description><![CDATA[
|
||||
<ul>
|
||||
<li>GH-376: Bugfix: Exiting full-screen sometimes causes crashes.</li>
|
||||
<li>Update RxSwift to <a href="https://github.com/ReactiveX/RxSwift/releases/tag/3.1.0">3.1.0</a></li>
|
||||
<li>GH-376: Fix a part of the bug. There's still an issue, cf. discussions in GH-376.</li>
|
||||
</ul>
|
||||
]]></description>
|
||||
<releaseNotesLink>
|
||||
https://github.com/qvacua/vimr/releases/tag/v0.12.3-156
|
||||
https://github.com/qvacua/vimr/releases/tag/v0.12.4-157
|
||||
</releaseNotesLink>
|
||||
<pubDate>2017-01-04T17:20:06.803676</pubDate>
|
||||
<pubDate>2017-01-05T06:01:49.512565</pubDate>
|
||||
<minimumSystemVersion>10.10.0</minimumSystemVersion>
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/v0.12.3-156/VimR-v0.12.3-156.tar.bz2"
|
||||
sparkle:version="156"
|
||||
sparkle:shortVersionString="0.12.3"
|
||||
sparkle:dsaSignature="MC4CFQCQyiK2/6pfHjxmvohzD4dBMANGnAIVAMXTNq+A/0LD8rF2aNKSOQgOFBEm"
|
||||
length="9306801"
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/v0.12.4-157/VimR-v0.12.4-157.tar.bz2"
|
||||
sparkle:version="157"
|
||||
sparkle:shortVersionString="0.12.4"
|
||||
sparkle:dsaSignature="MC4CFQDkEQCX3R3PoffiDFeP1EWEyb5NCwIVALEKIpnzxSYIEBqqnVKUMHRPBGqV"
|
||||
length="9314485"
|
||||
type="application/octet-stream"/>
|
||||
</item>
|
||||
</channel>
|
||||
|
@ -1,6 +1,6 @@
|
||||
# next
|
||||
# 0.12.4-156
|
||||
|
||||
* ...
|
||||
* GH-376: Fix a part of the bug. There's still an issue, cf. discussions in GH-376.
|
||||
|
||||
# 0.12.3-154
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user