Permalink
Browse files

Merge remote-tracking branch 'amadeus/master' into new-master

  • Loading branch information...
2 parents 10e7bed + 7be3545 commit 674e7a22f7b56ca4aa2d0ca687920fd7e8893ff5 @semikolon committed Nov 25, 2012
Showing with 271 additions and 100 deletions.
  1. +229 −97 runtime/syntax/javascript.vim
  2. +6 −0 src/MacVim/MMVimController.m
  3. +28 −0 src/MacVim/gui_macvim.m
  4. BIN src/MacVim/icons/MacVim-c.icns
  5. BIN src/MacVim/icons/MacVim-c.icns
  6. BIN src/MacVim/icons/MacVim-cpp.icns
  7. BIN src/MacVim/icons/MacVim-cpp.icns
  8. BIN src/MacVim/icons/MacVim-css.icns
  9. BIN src/MacVim/icons/MacVim-css.icns
  10. BIN src/MacVim/icons/MacVim-erl.icns
  11. BIN src/MacVim/icons/MacVim-erl.icns
  12. BIN src/MacVim/icons/MacVim-f.icns
  13. BIN src/MacVim/icons/MacVim-f.icns
  14. BIN src/MacVim/icons/MacVim-generic.icns
  15. BIN src/MacVim/icons/MacVim-h.icns
  16. BIN src/MacVim/icons/MacVim-h.icns
  17. BIN src/MacVim/icons/MacVim-hs.icns
  18. BIN src/MacVim/icons/MacVim-hs.icns
  19. BIN src/MacVim/icons/MacVim-html.icns
  20. BIN src/MacVim/icons/MacVim-html.icns
  21. BIN src/MacVim/icons/MacVim-io.icns
  22. BIN src/MacVim/icons/MacVim-io.icns
  23. BIN src/MacVim/icons/MacVim-java.icns
  24. BIN src/MacVim/icons/MacVim-java.icns
  25. BIN src/MacVim/icons/MacVim-js.icns
  26. BIN src/MacVim/icons/MacVim-js.icns
  27. BIN src/MacVim/icons/MacVim-lisp.icns
  28. BIN src/MacVim/icons/MacVim-lisp.icns
  29. BIN src/MacVim/icons/MacVim-m.icns
  30. BIN src/MacVim/icons/MacVim-m.icns
  31. BIN src/MacVim/icons/MacVim-markdown.icns
  32. BIN src/MacVim/icons/MacVim-markdown.icns
  33. BIN src/MacVim/icons/MacVim-mm.icns
  34. BIN src/MacVim/icons/MacVim-mm.icns
  35. BIN src/MacVim/icons/MacVim-php.icns
  36. BIN src/MacVim/icons/MacVim-php.icns
  37. BIN src/MacVim/icons/MacVim-ps.icns
  38. BIN src/MacVim/icons/MacVim-ps.icns
  39. BIN src/MacVim/icons/MacVim-py.icns
  40. BIN src/MacVim/icons/MacVim-py.icns
  41. BIN src/MacVim/icons/MacVim-rb.icns
  42. BIN src/MacVim/icons/MacVim-rb.icns
  43. BIN src/MacVim/icons/MacVim-tex.icns
  44. BIN src/MacVim/icons/MacVim-tex.icns
  45. BIN src/MacVim/icons/MacVim-xml.icns
  46. BIN src/MacVim/icons/MacVim-xml.icns
  47. BIN src/MacVim/icons/MacVim.icns
  48. +3 −3 src/message.c
  49. +2 −0 src/proto/gui_macvim.pro
  50. +3 −0 src/version.c

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1382,6 +1382,7 @@ - (void)handleBrowseForFile:(NSDictionary *)attr
NSString *dir = [attr objectForKey:@"dir"];
BOOL saving = [[attr objectForKey:@"saving"] boolValue];
+ BOOL browsedir = [[attr objectForKey:@"browsedir"] boolValue];
if (!dir) {
// 'dir == nil' means: set dir to the pwd of the Vim process, or let
@@ -1430,6 +1431,11 @@ - (void)handleBrowseForFile:(NSDictionary *)attr
[panel setAllowsMultipleSelection:NO];
[panel setAccessoryView:showHiddenFilesView()];
+ if (browsedir) {
+ [panel setCanChooseDirectories:YES];
+ [panel setCanChooseFiles:NO];
+ }
+
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6)
// NOTE: -[NSOpenPanel beginSheetForDirectory:::::::] is deprecated on
// 10.6 but -[NSOpenPanel setDirectoryURL:] requires 10.6 so jump
View
@@ -1431,6 +1431,34 @@
return s;
}
+
+/*
+ * Put up a directory selector
+ * Returns the selected name in allocated memory, or NULL for Cancel.
+ * title title for the window (UNUSED)
+ * initdir initial directory, NULL for current dir
+ */
+ char_u *
+gui_mch_browsedir(
+ char_u *title,
+ char_u *initdir)
+{
+ ASLogDebug(@"title='%s' initdir='%s'", title, initdir);
+
+ // Ensure no data is on the output queue before presenting the dialog.
+ gui_macvim_force_flush();
+
+ NSMutableDictionary *attr = [NSMutableDictionary
+ dictionaryWithObject:[NSNumber numberWithBool:YES]
+ forKey:@"browsedir"];
+ if (initdir)
+ [attr setObject:[NSString stringWithVimString:initdir] forKey:@"dir"];
+
+ char_u *s = (char_u*)[[MMBackend sharedInstance]
+ browseForFileWithAttributes:attr];
+
+ return s;
+}
#endif /* FEAT_BROWSE */
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -3825,17 +3825,17 @@ do_browse(flags, title, dflt, ext, initdir, filter, buf)
filter = BROWSE_FILTER_DEFAULT;
if (flags & BROWSE_DIR)
{
-# if defined(FEAT_GUI_GTK) || defined(WIN3264)
+# if defined(FEAT_GUI_GTK) || defined(WIN3264) || defined(FEAT_GUI_MACVIM)
/* For systems that have a directory dialog. */
fname = gui_mch_browsedir(title, initdir);
# else
/* Generic solution for selecting a directory: select a file and
* remove the file name. */
fname = gui_mch_browse(0, title, dflt, ext, initdir, (char_u *)"");
# endif
-# if !defined(FEAT_GUI_GTK)
+# if !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM))
/* Win32 adds a dummy file name, others return an arbitrary file
- * name. GTK+ 2 returns only the directory, */
+ * name. GTK+ 2 and MacVim returns only the directory, */
if (fname != NULL && *fname != NUL && !mch_isdir(fname))
{
/* Remove the file name. */
View
@@ -92,6 +92,8 @@ gui_mch_browse(
char_u *ext,
char_u *initdir,
char_u *filter);
+ char_u *
+gui_mch_browsedir(char_u *title, char_u *initdir);
void
gui_mch_create_scrollbar(
scrollbar_T *sb,
View
@@ -2419,6 +2419,7 @@ intro_message(colon)
int blanklines;
int sponsor;
char *p;
+ /*
static char *(lines[]) =
{
N_("VIM - Vi IMproved"),
@@ -2447,6 +2448,8 @@ intro_message(colon)
N_("type :set nocp<Enter> for Vim defaults"),
N_("type :help cp-default<Enter> for info on this"),
};
+ */
+ static char *(lines[]) = {};
#ifdef FEAT_GUI
static char *(gui_lines[]) =
{

0 comments on commit 674e7a2

Please sign in to comment.