Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 48041000cfa475c9f32b194df81ae6e86ea7b049fce44660dfb52d036ef4dd8a
Ticket: a7c1c2c7e56410980eb154b681f0c5958f2f4cd1
lsearch with -all options does not return -1 where no match is found
User & Date: jan.nijtmans on 2020-06-21 15:43:18
Changes

  1. closedate changed to: "2459022.15507875"
  2. closer changed to: "jan.nijtmans"
  3. icomment:
    Maybe surprising, but - apparently - this is exactly as expected. The documentation of "-all" says: "Changes the result to be the list of all matching indices". Since there is no match, the list of all matching indices is empty and that's what's returned.
    
    The documentation you state also contains "(unless the options -all or -inline are specified.)". So, the command only returns -1 for no match is neither -all nor -inline is specified. So - my conclusion - is: This is as originally designed, and it's as it should be. So, marking this one as "Invalid", since it works as designed.
    
    However, I adapted the documentation a little bit, clarify this confusion.
    
  4. login: "jan.nijtmans"
  5. mimetype: "text/x-fossil-wiki"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"