summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.299
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/ap/vim/patches/7.3.299
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/ap/vim/patches/7.3.299')
-rw-r--r--source/ap/vim/patches/7.3.299516
1 files changed, 516 insertions, 0 deletions
diff --git a/source/ap/vim/patches/7.3.299 b/source/ap/vim/patches/7.3.299
new file mode 100644
index 00000000..4f755d90
--- /dev/null
+++ b/source/ap/vim/patches/7.3.299
@@ -0,0 +1,516 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.3.299
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.3.299
+Problem: Source code not in Vim style.
+Solution: Adjust the style. (Elias Diem)
+Files: src/gui_photon.c
+
+
+*** ../vim-7.3.298/src/gui_photon.c 2011-09-07 18:58:24.000000000 +0200
+--- src/gui_photon.c 2011-09-07 19:02:59.000000000 +0200
+***************
+*** 535,547 ****
+ &src_taken,
+ buf,
+ 6,
+! &dst_made );
+
+! add_to_input_buf( buf, dst_made );
+ }
+ else
+ {
+! add_to_input_buf( string, len );
+ }
+
+ return Pt_CONSUME;
+--- 535,547 ----
+ &src_taken,
+ buf,
+ 6,
+! &dst_made);
+
+! add_to_input_buf(buf, dst_made);
+ }
+ else
+ {
+! add_to_input_buf(string, len);
+ }
+
+ return Pt_CONSUME;
+***************
+*** 549,579 ****
+ len = 0;
+ #endif
+ ch = key->key_cap;
+! if( ch < 0xff )
+ {
+ /* FIXME: is this the right thing to do? */
+! if( modifiers & MOD_MASK_CTRL )
+ {
+ modifiers &= ~MOD_MASK_CTRL;
+
+! if( ( ch >= 'a' && ch <= 'z' ) ||
+ ch == '[' ||
+ ch == ']' ||
+! ch == '\\' )
+! ch = Ctrl_chr( ch );
+! else if( ch == '2' )
+ ch = NUL;
+! else if( ch == '6' )
+ ch = 0x1e;
+! else if( ch == '-' )
+ ch = 0x1f;
+ else
+ modifiers |= MOD_MASK_CTRL;
+ }
+
+! if( modifiers & MOD_MASK_ALT )
+ {
+! ch = Meta( ch );
+ modifiers &= ~MOD_MASK_ALT;
+ }
+ }
+--- 549,579 ----
+ len = 0;
+ #endif
+ ch = key->key_cap;
+! if (ch < 0xff)
+ {
+ /* FIXME: is this the right thing to do? */
+! if (modifiers & MOD_MASK_CTRL)
+ {
+ modifiers &= ~MOD_MASK_CTRL;
+
+! if ((ch >= 'a' && ch <= 'z') ||
+ ch == '[' ||
+ ch == ']' ||
+! ch == '\\')
+! ch = Ctrl_chr(ch);
+! else if (ch == '2')
+ ch = NUL;
+! else if (ch == '6')
+ ch = 0x1e;
+! else if (ch == '-')
+ ch = 0x1f;
+ else
+ modifiers |= MOD_MASK_CTRL;
+ }
+
+! if (modifiers & MOD_MASK_ALT)
+ {
+! ch = Meta(ch);
+ modifiers &= ~MOD_MASK_ALT;
+ }
+ }
+***************
+*** 586,604 ****
+ modifiers &= ~MOD_MASK_SHIFT;
+ }
+
+! ch = simplify_key( ch, &modifiers );
+! if( modifiers )
+ {
+ string[ len++ ] = CSI;
+ string[ len++ ] = KS_MODIFIER;
+ string[ len++ ] = modifiers;
+ }
+
+! if( IS_SPECIAL( ch ) )
+ {
+ string[ len++ ] = CSI;
+! string[ len++ ] = K_SECOND( ch );
+! string[ len++ ] = K_THIRD( ch );
+ }
+ else
+ {
+--- 586,604 ----
+ modifiers &= ~MOD_MASK_SHIFT;
+ }
+
+! ch = simplify_key(ch, &modifiers);
+! if (modifiers)
+ {
+ string[ len++ ] = CSI;
+ string[ len++ ] = KS_MODIFIER;
+ string[ len++ ] = modifiers;
+ }
+
+! if (IS_SPECIAL(ch))
+ {
+ string[ len++ ] = CSI;
+! string[ len++ ] = K_SECOND(ch);
+! string[ len++ ] = K_THIRD(ch);
+ }
+ else
+ {
+***************
+*** 619,627 ****
+ string[ len++ ] = KE_CSI;
+ }
+
+! if( len > 0 )
+ {
+! add_to_input_buf( string, len );
+ return Pt_CONSUME;
+ }
+ }
+--- 619,627 ----
+ string[ len++ ] = KE_CSI;
+ }
+
+! if (len > 0)
+ {
+! add_to_input_buf(string, len);
+ return Pt_CONSUME;
+ }
+ }
+***************
+*** 630,646 ****
+ }
+
+ static int
+! gui_ph_handle_mouse( PtWidget_t *widget, void *data, PtCallbackInfo_t *info )
+ {
+ PhPointerEvent_t *pointer;
+ PhRect_t *pos;
+ int button = 0, repeated_click, modifiers = 0x0;
+ short mouse_x, mouse_y;
+
+! pointer = PhGetData( info->event );
+! pos = PhGetRects( info->event );
+
+! gui_mch_mousehide( MOUSE_SHOW );
+
+ /*
+ * Coordinates need to be relative to the base window,
+--- 630,646 ----
+ }
+
+ static int
+! gui_ph_handle_mouse(PtWidget_t *widget, void *data, PtCallbackInfo_t *info)
+ {
+ PhPointerEvent_t *pointer;
+ PhRect_t *pos;
+ int button = 0, repeated_click, modifiers = 0x0;
+ short mouse_x, mouse_y;
+
+! pointer = PhGetData(info->event);
+! pos = PhGetRects(info->event);
+
+! gui_mch_mousehide(MOUSE_SHOW);
+
+ /*
+ * Coordinates need to be relative to the base window,
+***************
+*** 649,675 ****
+ mouse_x = pos->ul.x + gui.border_width;
+ mouse_y = pos->ul.y + gui.border_width;
+
+! if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON )
+ {
+! gui_mouse_moved( mouse_x, mouse_y );
+ return Pt_CONTINUE;
+ }
+
+! if( pointer->key_mods & Pk_KM_Shift )
+ modifiers |= MOUSE_SHIFT;
+! if( pointer->key_mods & Pk_KM_Ctrl )
+ modifiers |= MOUSE_CTRL;
+! if( pointer->key_mods & Pk_KM_Alt )
+ modifiers |= MOUSE_ALT;
+
+ /*
+ * FIXME More than one button may be involved, but for
+ * now just deal with one
+ */
+! if( pointer->buttons & Ph_BUTTON_SELECT )
+ button = MOUSE_LEFT;
+
+! if( pointer->buttons & Ph_BUTTON_MENU )
+ {
+ button = MOUSE_RIGHT;
+ /* Need the absolute coordinates for the popup menu */
+--- 649,675 ----
+ mouse_x = pos->ul.x + gui.border_width;
+ mouse_y = pos->ul.y + gui.border_width;
+
+! if (info->event->type == Ph_EV_PTR_MOTION_NOBUTTON)
+ {
+! gui_mouse_moved(mouse_x, mouse_y);
+ return Pt_CONTINUE;
+ }
+
+! if (pointer->key_mods & Pk_KM_Shift)
+ modifiers |= MOUSE_SHIFT;
+! if (pointer->key_mods & Pk_KM_Ctrl)
+ modifiers |= MOUSE_CTRL;
+! if (pointer->key_mods & Pk_KM_Alt)
+ modifiers |= MOUSE_ALT;
+
+ /*
+ * FIXME More than one button may be involved, but for
+ * now just deal with one
+ */
+! if (pointer->buttons & Ph_BUTTON_SELECT)
+ button = MOUSE_LEFT;
+
+! if (pointer->buttons & Ph_BUTTON_MENU)
+ {
+ button = MOUSE_RIGHT;
+ /* Need the absolute coordinates for the popup menu */
+***************
+*** 677,705 ****
+ abs_mouse.y = pointer->pos.y;
+ }
+
+! if( pointer->buttons & Ph_BUTTON_ADJUST )
+ button = MOUSE_MIDDLE;
+
+ /* Catch a real release (not phantom or other releases */
+! if( info->event->type == Ph_EV_BUT_RELEASE )
+ button = MOUSE_RELEASE;
+
+! if( info->event->type & Ph_EV_PTR_MOTION_BUTTON )
+ button = MOUSE_DRAG;
+
+ #if 0
+ /* Vim doesn't use button repeats */
+! if( info->event->type & Ph_EV_BUT_REPEAT )
+ button = MOUSE_DRAG;
+ #endif
+
+ /* Don't do anything if it is one of the phantom mouse release events */
+! if( ( button != MOUSE_RELEASE ) ||
+! ( info->event->subtype == Ph_EV_RELEASE_REAL ) )
+ {
+ repeated_click = (pointer->click_count >= 2) ? TRUE : FALSE;
+
+! gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers );
+ }
+
+ return Pt_CONTINUE;
+--- 677,705 ----
+ abs_mouse.y = pointer->pos.y;
+ }
+
+! if (pointer->buttons & Ph_BUTTON_ADJUST)
+ button = MOUSE_MIDDLE;
+
+ /* Catch a real release (not phantom or other releases */
+! if (info->event->type == Ph_EV_BUT_RELEASE)
+ button = MOUSE_RELEASE;
+
+! if (info->event->type & Ph_EV_PTR_MOTION_BUTTON)
+ button = MOUSE_DRAG;
+
+ #if 0
+ /* Vim doesn't use button repeats */
+! if (info->event->type & Ph_EV_BUT_REPEAT)
+ button = MOUSE_DRAG;
+ #endif
+
+ /* Don't do anything if it is one of the phantom mouse release events */
+! if ((button != MOUSE_RELEASE) ||
+! (info->event->subtype == Ph_EV_RELEASE_REAL))
+ {
+ repeated_click = (pointer->click_count >= 2) ? TRUE : FALSE;
+
+! gui_send_mouse_event(button , mouse_x, mouse_y, repeated_click, modifiers);
+ }
+
+ return Pt_CONTINUE;
+***************
+*** 707,741 ****
+
+ /* Handle a focus change of the PtRaw widget */
+ static int
+! gui_ph_handle_focus( PtWidget_t *widget, void *data, PtCallbackInfo_t *info )
+ {
+! if( info->reason == Pt_CB_LOST_FOCUS )
+ {
+! PtRemoveEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+! gui_ph_handle_mouse, NULL );
+
+! gui_mch_mousehide( MOUSE_SHOW );
+ }
+ else
+ {
+! PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+! gui_ph_handle_mouse, NULL );
+ }
+ return Pt_CONTINUE;
+ }
+
+ static void
+! gui_ph_handle_raw_draw( PtWidget_t *widget, PhTile_t *damage )
+ {
+ PhRect_t *r;
+ PhPoint_t offset;
+ PhPoint_t translation;
+
+! if( is_ignore_draw == TRUE )
+ return;
+
+! PtSuperClassDraw( PtBasic, widget, damage );
+! PgGetTranslation( &translation );
+ PgClearTranslation();
+
+ #if 0
+--- 707,741 ----
+
+ /* Handle a focus change of the PtRaw widget */
+ static int
+! gui_ph_handle_focus(PtWidget_t *widget, void *data, PtCallbackInfo_t *info)
+ {
+! if (info->reason == Pt_CB_LOST_FOCUS)
+ {
+! PtRemoveEventHandler(gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+! gui_ph_handle_mouse, NULL);
+
+! gui_mch_mousehide(MOUSE_SHOW);
+ }
+ else
+ {
+! PtAddEventHandler(gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+! gui_ph_handle_mouse, NULL);
+ }
+ return Pt_CONTINUE;
+ }
+
+ static void
+! gui_ph_handle_raw_draw(PtWidget_t *widget, PhTile_t *damage)
+ {
+ PhRect_t *r;
+ PhPoint_t offset;
+ PhPoint_t translation;
+
+! if (is_ignore_draw == TRUE)
+ return;
+
+! PtSuperClassDraw(PtBasic, widget, damage);
+! PgGetTranslation(&translation);
+ PgClearTranslation();
+
+ #if 0
+***************
+*** 750,770 ****
+ out_flush();
+ #endif
+
+! PtWidgetOffset( widget, &offset );
+! PhTranslatePoint( &offset, PtWidgetPos( gui.vimTextArea, NULL ) );
+
+ #if 1
+ /* Redraw individual damage regions */
+! if( damage->next != NULL )
+ damage = damage->next;
+
+! while( damage != NULL )
+ {
+ r = &damage->rect;
+ gui_redraw(
+ r->ul.x - offset.x, r->ul.y - offset.y,
+ r->lr.x - r->ul.x + 1,
+! r->lr.y - r->ul.y + 1 );
+ damage = damage->next;
+ }
+ #else
+--- 750,770 ----
+ out_flush();
+ #endif
+
+! PtWidgetOffset(widget, &offset);
+! PhTranslatePoint(&offset, PtWidgetPos(gui.vimTextArea, NULL));
+
+ #if 1
+ /* Redraw individual damage regions */
+! if (damage->next != NULL)
+ damage = damage->next;
+
+! while(damage != NULL)
+ {
+ r = &damage->rect;
+ gui_redraw(
+ r->ul.x - offset.x, r->ul.y - offset.y,
+ r->lr.x - r->ul.x + 1,
+! r->lr.y - r->ul.y + 1);
+ damage = damage->next;
+ }
+ #else
+***************
+*** 773,796 ****
+ gui_redraw(
+ r->ul.x - offset.x, r->ul.y - offset.y,
+ r->lr.x - r->ul.x + 1,
+! r->lr.y - r->ul.y + 1 );
+ #endif
+
+! PgSetTranslation( &translation, 0 );
+ }
+
+ static int
+ gui_ph_handle_pulldown_menu(
+ PtWidget_t *widget,
+ void *data,
+! PtCallbackInfo_t *info )
+ {
+! if( data != NULL )
+ {
+ vimmenu_T *menu = (vimmenu_T *) data;
+
+! PtPositionMenu( menu->submenu_id, NULL );
+! PtRealizeWidget( menu->submenu_id );
+ }
+
+ return Pt_CONTINUE;
+--- 773,796 ----
+ gui_redraw(
+ r->ul.x - offset.x, r->ul.y - offset.y,
+ r->lr.x - r->ul.x + 1,
+! r->lr.y - r->ul.y + 1);
+ #endif
+
+! PgSetTranslation(&translation, 0);
+ }
+
+ static int
+ gui_ph_handle_pulldown_menu(
+ PtWidget_t *widget,
+ void *data,
+! PtCallbackInfo_t *info)
+ {
+! if (data != NULL)
+ {
+ vimmenu_T *menu = (vimmenu_T *) data;
+
+! PtPositionMenu(menu->submenu_id, NULL);
+! PtRealizeWidget(menu->submenu_id);
+ }
+
+ return Pt_CONTINUE;
+*** ../vim-7.3.298/src/version.c 2011-09-07 18:58:24.000000000 +0200
+--- src/version.c 2011-09-07 19:01:17.000000000 +0200
+***************
+*** 711,712 ****
+--- 711,714 ----
+ { /* Add new patch number below this line */
++ /**/
++ 299,
+ /**/
+
+--
+The only way the average employee can speak to an executive is by taking a
+second job as a golf caddie.
+ (Scott Adams - The Dilbert principle)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///