Changeset b68f9cd


Ignore:
Timestamp:
Jun 30, 2002, 1:41:05 PM (21 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
262422c
Parents:
e75011e
Message:
	Added "edit:delete-prev-word" command and bound M-BACKSPACE to it.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    re75011e rb68f9cd  
    1111        Fixed a bug in the summary field for user-created aliases
    1212        Added "reply zaway" which sends a zaway response to the current msg.
     13        Added "edit:delete-prev-word" command and bound M-BACKSPACE to it.
    1314               
    14151.2.1-pre-1
  • commands.c

    re75011e rb68f9cd  
    542542                  OWL_CTX_EDIT,
    543543                  "deletes the word to the right of the cursor",
     544                  "", ""),
     545
     546  OWLCMD_VOID_CTX("edit:delete-prev-word", owl_editwin_delete_previousword,
     547                  OWL_CTX_EDIT,
     548                  "deletes the word to the left of the cursor",
    544549                  "", ""),
    545550
  • editwin.c

    rd36f2cb rb68f9cd  
    614614}
    615615
     616void owl_editwin_delete_previousword(owl_editwin *e) {
     617  /* go backwards to the last non-space character, then delete chars */
     618  int i, startpos, endpos;
     619
     620  startpos = _owl_editwin_get_index_from_xy(e);
     621  owl_editwin_move_to_previousword(e);
     622  endpos = _owl_editwin_get_index_from_xy(e);
     623  for (i=0; i<startpos-endpos; i++) {
     624    owl_editwin_delete_char(e);
     625  }
     626}
     627
    616628void owl_editwin_delete_to_endofline(owl_editwin *e) {
    617629  int i;
  • keys.c

    r6794f72 rb68f9cd  
    5858  BIND_CMD("C-e",         "edit:move-to-line-end", "");
    5959
     60  BIND_CMD("M-DELETE",    "edit:delete-prev-word", "");
    6061  BIND_CMD("M-d",         "edit:delete-next-word", "");
    6162  BIND_CMD("M-[ 3 ; 3 ~", "edit:delete-next-word", "");
Note: See TracChangeset for help on using the changeset viewer.