summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-06-07 21:09:25 +0000
committerBram Moolenaar <Bram@vim.org>2005-06-07 21:09:25 +0000
commit82cf9b6851bcd4d28f65df8d95c2bcabc780b810 (patch)
tree0f5cb1fa0fb34ab46fa0d51c92087dee7ecaafc8 /src
parentc4a06d34471d21532a3e0535e547b3d797992350 (diff)
downloadvim-82cf9b6851bcd4d28f65df8d95c2bcabc780b810.zip
updated for version 7.0082
Diffstat (limited to 'src')
-rw-r--r--src/ex_cmds2.c2
-rw-r--r--src/globals.h1
-rw-r--r--src/gui_gtk.c8
-rw-r--r--src/option.c16
-rw-r--r--src/proto/fileio.pro1
-rw-r--r--src/proto/spell.pro2
-rw-r--r--src/structs.h1
-rw-r--r--src/version.h4
8 files changed, 30 insertions, 5 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 5ff0d402f..3c591d026 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1303,7 +1303,7 @@ dialog_changed(buf, checkall)
int ret;
buf_T *buf2;
- dialog_msg(buff, _("Save changes to \"%.*s\"?"),
+ dialog_msg(buff, _("Save changes to \"%s\"?"),
(buf->b_fname != NULL) ?
buf->b_fname : (char_u *)_("Untitled"));
if (checkall)
diff --git a/src/globals.h b/src/globals.h
index 446717d79..c073fcbcc 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1434,6 +1434,7 @@ EXTERN char_u e_emptybuf[] INIT(=N_("E749: empty buffer"));
#ifdef FEAT_EX_EXTRA
EXTERN char_u e_invalpat[] INIT(=N_("E682: Invalid search pattern or delimiter"));
#endif
+EXTERN char_u e_bufloaded[] INIT(=N_("E139: File is loaded in another buffer"));
#ifdef MACOS_X_UNIX
EXTERN short disallow_gui INIT(= FALSE);
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index b23792555..641f784b8 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -2241,8 +2241,12 @@ dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
DialogInfo *di = (DialogInfo *)data;
/* Ignore hitting "Enter" if there is no default button. */
- if (di->ignore_enter && event->keyval == GDK_Return)
+ if (event->keyval == GDK_Return)
+ {
+ if (!di->ignore_enter)
+ gtk_dialog_response(di->dialog, GTK_RESPONSE_ACCEPT);
return TRUE;
+ }
/* Close the dialog when hitting "Esc". */
if (event->keyval == GDK_Escape)
@@ -2326,6 +2330,8 @@ gui_mch_dialog(int type, /* type of dialog */
/* GTK_RESPONSE_NONE means the dialog was programmatically destroyed. */
if (response != GTK_RESPONSE_NONE)
{
+ if (response == GTK_RESPONSE_ACCEPT) /* Enter pressed */
+ response = def_but;
if (textfield != NULL)
{
text = (char_u *)gtk_entry_get_text(GTK_ENTRY(entry));
diff --git a/src/option.c b/src/option.c
index 24b709e30..1211ce797 100644
--- a/src/option.c
+++ b/src/option.c
@@ -121,6 +121,7 @@ typedef enum
, PV_SI
, PV_SN
, PV_SPELL
+ , PV_SPF
, PV_SPL
, PV_STL
, PV_STS
@@ -234,6 +235,7 @@ static long p_sw;
static int p_swf;
#ifdef FEAT_SYN_HL
static char_u *p_syn;
+static char_u *p_spf;
static char_u *p_spl;
#endif
static long p_ts;
@@ -2029,10 +2031,19 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)FALSE, (char_u *)0L}},
+ {"spellfile", "spf", P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE,
+#ifdef FEAT_SYN_HL
+ (char_u *)&p_spf, PV_SPF,
+ {(char_u *)"", (char_u *)0L}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+#endif
+ },
{"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_RBUF,
#ifdef FEAT_SYN_HL
(char_u *)&p_spl, PV_SPL,
- {(char_u *)"", (char_u *)0L}
+ {(char_u *)"en", (char_u *)0L}
#else
(char_u *)NULL, PV_NONE,
{(char_u *)0L, (char_u *)0L}
@@ -4612,6 +4623,7 @@ check_buf_options(buf)
#endif
#ifdef FEAT_SYN_HL
check_string_option(&buf->b_p_syn);
+ check_string_option(&buf->b_p_spf);
check_string_option(&buf->b_p_spl);
#endif
#ifdef FEAT_SEARCHPATH
@@ -8313,6 +8325,7 @@ get_varp(p)
case PV_SWF: return (char_u *)&(curbuf->b_p_swf);
#ifdef FEAT_SYN_HL
case PV_SYN: return (char_u *)&(curbuf->b_p_syn);
+ case PV_SPF: return (char_u *)&(curbuf->b_p_spf);
case PV_SPL: return (char_u *)&(curbuf->b_p_spl);
#endif
case PV_SW: return (char_u *)&(curbuf->b_p_sw);
@@ -8623,6 +8636,7 @@ buf_copy_options(buf, flags)
#ifdef FEAT_SYN_HL
/* Don't copy 'syntax', it must be set */
buf->b_p_syn = empty_option;
+ buf->b_p_spf = vim_strsave(p_spf);
buf->b_p_spl = vim_strsave(p_spl);
#endif
#if defined(FEAT_CINDENT) && defined(FEAT_EVAL)
diff --git a/src/proto/fileio.pro b/src/proto/fileio.pro
index 68594ba8f..7d59f557b 100644
--- a/src/proto/fileio.pro
+++ b/src/proto/fileio.pro
@@ -15,6 +15,7 @@ int tag_fgets __ARGS((char_u *buf, int size, FILE *fp));
int vim_rename __ARGS((char_u *from, char_u *to));
int check_timestamps __ARGS((int focus));
int buf_check_timestamp __ARGS((buf_T *buf, int focus));
+void buf_reload __ARGS((buf_T *buf));
void buf_store_time __ARGS((buf_T *buf, struct stat *st, char_u *fname));
void write_lnum_adjust __ARGS((linenr_T offset));
void vim_deltempdir __ARGS((void));
diff --git a/src/proto/spell.pro b/src/proto/spell.pro
index 4fcb7ba3d..71d6dbc1e 100644
--- a/src/proto/spell.pro
+++ b/src/proto/spell.pro
@@ -5,5 +5,7 @@ char_u *did_set_spelllang __ARGS((buf_T *buf));
void spell_reload __ARGS((void));
void put_bytes __ARGS((FILE *fd, long_u nr, int len));
void ex_mkspell __ARGS((exarg_T *eap));
+void ex_spell __ARGS((exarg_T *eap));
+void spell_add_word __ARGS((char_u *word, int len, int bad));
void init_spell_chartab __ARGS((void));
/* vim: set ft=c : */
diff --git a/src/structs.h b/src/structs.h
index a45a98ee4..18915cfad 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1341,6 +1341,7 @@ struct file_buffer
int b_p_swf; /* 'swapfile' */
#ifdef FEAT_SYN_HL
char_u *b_p_syn; /* 'syntax' */
+ char_u *b_p_spf; /* 'spellfile' */
char_u *b_p_spl; /* 'spelllang' */
#endif
long b_p_ts; /* 'tabstop' */
diff --git a/src/version.h b/src/version.h
index afb4c5fb5..b1c0abbf5 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 6)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 6, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 7)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 7, compiled "