]> git.street.me.uk Git - andy/viking.git/commitdiff
Enable understanding pasted text strings with tabs.
authorRob Norris <rw_norris@hotmail.com>
Thu, 12 Jan 2017 23:59:08 +0000 (23:59 +0000)
committerRob Norris <rw_norris@hotmail.com>
Sat, 14 Jan 2017 12:23:33 +0000 (12:23 +0000)
src/clipboard.c

index 61c7c8528b91fa73ca4158ad524077de7c9f0a70..64471379ace52b98e3d11de84d22294c54253516 100644 (file)
@@ -163,6 +163,10 @@ static gboolean clip_parse_latlon ( const gchar *text, struct LatLon *coord )
         s[i+2] = ' ';
       }
     }
+    if ( g_ascii_iscntrl (s[i]) ) {
+      // Replace any control characters (i.e. mainly for tabs) with a space
+      s[i] = ' ';
+    }
   }
 
   /* now try reading coordinates */