 (defun +snippets/delete-backward-char (&optional field)
   "Prevents Yas from interfering with backspace deletion."
   (interactive)
-  (let ((field (or field (and yas--active-field-overlay
+  (let ((field (or field (and (overlayp yas--active-field-overlay)
                               (overlay-buffer yas--active-field-overlay)
                               (overlay-get yas--active-field-overlay 'yas--field)))))
-    (cond ((eq (point) (marker-position (yas--field-start field))) nil)
-          (t (call-interactively #'delete-backward-char)))))
+    (unless (and (yas--field-p field)
+                 (eq (point) (marker-position (yas--field-start field))))
+      (call-interactively #'delete-backward-char))))
 
 ;;;###autoload
 (defun +snippets/delete-forward-char-or-field (&optional field)

  "Go to the end of the current field."
  (interactive)
  (let* ((snippet (car (yas-active-snippets)))
         (position (yas--field-end (yas--snippet-active-field snippet))))
    (if (= (point) position)
        (move-end-of-line 1)
      (goto-char position))))

  "Go to the beginning of the current field."
  (interactive)
  (let* ((snippet (car (yas-active-snippets)))
         (active-field (yas--snippet-active-field snippet))
         (position (if (yas--field-p active-field) (yas--field-start active-field) -1)))
    (if (= (point) position)
        (move-beginning-of-line 1)
      (goto-char position))))
